Skip to main content

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

NameType
__namedParametersBucketOptions

Methods

delete

delete(attributeNames): Promise<any>

Delete person attributes from the bucket

Throws

Error if the operation fails.

Parameters

NameTypeDescription
attributeNamesstring[]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

NameType
AttributesTypeextends JsonObject

Parameters

NameTypeDescription
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

NameType
AttributesTypeextends JsonObject

Parameters

NameTypeDescription
attributesAttributesTypeA serializable object to associate with the user credential.

Returns

Promise<void>