Class: Bucket
Types.Bucket
An object that allows you to access and modify the attributes stored within the named bucket. The easiest way to create a bucket is by using the getBucket method and passing in the bucket name.
Constructors
constructor
• new Bucket(__namedParameters
)
Parameters
Name | Type |
---|---|
__namedParameters | BucketOptions |
Methods
delete
▸ delete(attributeNames
): Promise
<any
>
Delete person attributes from the bucket
Throws
Error
if the operation fails.
Parameters
Name | Type | Description |
---|---|---|
attributeNames | string [] | You must specify which data attributes to delete by supplying a list of filter strings. |
Returns
Promise
<any
>
get
▸ get<AttributesType
>(attributeNames?
): Promise
<AttributesType
>
Retrieve attributes for a person from the bucket
Throws
Error
if the operation fails.
Type parameters
Name | Type |
---|---|
AttributesType | extends JsonObject |
Parameters
Name | Type | Description |
---|---|---|
attributeNames? | string [] | You can optionally filter which attributes to retrieve by supplying a list of attribute names. If you don't the method returns all attributes. |
Returns
Promise
<AttributesType
>
A map from string
to basic types containing user data previously associated with set.
set
▸ set<AttributesType
>(attributes
): Promise
<void
>
Set attributes for a person in the bucket
Throws
Error
if the operation fails.
Type parameters
Name | Type |
---|---|
AttributesType | extends JsonObject |
Parameters
Name | Type | Description |
---|---|---|
attributes | AttributesType | A serializable object to associate with the user credential. |
Returns
Promise
<void
>