Container class

Operations for reading, replacing, or deleting a specific, existing container by id.

Properties

conflicts
database
id
items

Operations for creating new items, and reading/querying all items For reading, replacing, or deleting an existing item, use .item(id).

storedProcedures

Operations for creating new stored procedures, and reading/querying all stored procedures. For reading, replacing, or deleting an existing stored procedure, use .storedProcedure(id).

triggers

Operations for creating new triggers, and reading/querying all triggers. For reading, replacing, or deleting an existing trigger, use .trigger(id).

url

Returns a reference URL to the resource. Used for linking in Permissions.

userDefinedFunctions

Operations for creating new user defined functions, and reading/querying all user defined functions. For reading, replacing, or deleting an existing user defined function, use .userDefinedFunction(id).

Methods

conflict(string)

Used to read, replace, or delete a specific, existing <xref:Conflict> by id. Use .conflicts for creating new conflicts, or querying/reading all conflicts.

delete(RequestOptions)

Delete the container

extractPartitionKey(any, PartitionKeyDefinition)
item(string, string)

Used to read, replace, or delete a specific, existing <xref:Item> by id. Use .items for creating new items, or querying/reading all items.

read(RequestOptions)

Read the container's definition

readPartitionKeyRanges(FeedOptions)
replace(ContainerDefinition, RequestOptions)

Replace the container's definition

storedProcedure(string)

Used to read, replace, or delete a specific, existing <xref:StoredProcedure> by id. Use .storedProcedures for creating new stored procedures, or querying/reading all stored procedures.

trigger(string)

Used to read, replace, or delete a specific, existing <xref:Trigger> by id. Use .triggers for creating new triggers, or querying/reading all triggers.

userDefinedFunction(string)

Used to read, replace, or delete a specific, existing <xref:UserDefinedFunction> by id. Use .userDefinedFunctions for creating new user defined functions, or querying/reading all user defined functions.

Property Details

conflicts

conflicts: Conflicts

Property Value

database

database: Database

Property Value

id

id: string

Property Value

string

items

Operations for creating new items, and reading/querying all items For reading, replacing, or deleting an existing item, use .item(id).

items: Items

Property Value

storedProcedures

Operations for creating new stored procedures, and reading/querying all stored procedures. For reading, replacing, or deleting an existing stored procedure, use .storedProcedure(id).

storedProcedures: StoredProcedures

Property Value

triggers

Operations for creating new triggers, and reading/querying all triggers. For reading, replacing, or deleting an existing trigger, use .trigger(id).

triggers: Triggers

Property Value

url

Returns a reference URL to the resource. Used for linking in Permissions.

url: string

Property Value

string

userDefinedFunctions

Operations for creating new user defined functions, and reading/querying all user defined functions. For reading, replacing, or deleting an existing user defined function, use .userDefinedFunction(id).

userDefinedFunctions: UserDefinedFunctions

Property Value

Method Details

conflict(string)

Used to read, replace, or delete a specific, existing <xref:Conflict> by id. Use .conflicts for creating new conflicts, or querying/reading all conflicts.

function conflict(id: string)

Parameters

id
string

The id of the <xref:Conflict>.

Returns

delete(RequestOptions)

Delete the container

function delete(options?: RequestOptions)

Parameters

options
RequestOptions

Returns

extractPartitionKey(any, PartitionKeyDefinition)

function extractPartitionKey(document: any, partitionKeyDefinition: PartitionKeyDefinition)

Parameters

document
any
partitionKeyDefinition
PartitionKeyDefinition

Returns

item(string, string)

Used to read, replace, or delete a specific, existing <xref:Item> by id. Use .items for creating new items, or querying/reading all items.

function item(id: string, partitionKey?: string)

Parameters

id
string

The id of the <xref:Item>.

partitionKey
string

The partition key of the <xref:Item>. (Required for partitioned containers).

Returns

read(RequestOptions)

Read the container's definition

function read(options?: RequestOptions)

Parameters

options
RequestOptions

Returns

readPartitionKeyRanges(FeedOptions)

function readPartitionKeyRanges(feedOptions?: FeedOptions)

Parameters

feedOptions
FeedOptions

Returns

replace(ContainerDefinition, RequestOptions)

Replace the container's definition

function replace(body: ContainerDefinition, options?: RequestOptions)

Parameters

options
RequestOptions

Returns

storedProcedure(string)

Used to read, replace, or delete a specific, existing <xref:StoredProcedure> by id. Use .storedProcedures for creating new stored procedures, or querying/reading all stored procedures.

function storedProcedure(id: string)

Parameters

id
string

The id of the <xref:StoredProcedure>.

Returns

trigger(string)

Used to read, replace, or delete a specific, existing <xref:Trigger> by id. Use .triggers for creating new triggers, or querying/reading all triggers.

function trigger(id: string)

Parameters

id
string

The id of the <xref:Trigger>.

Returns

userDefinedFunction(string)

Used to read, replace, or delete a specific, existing <xref:UserDefinedFunction> by id. Use .userDefinedFunctions for creating new user defined functions, or querying/reading all user defined functions.

function userDefinedFunction(id: string)

Parameters

id
string

The id of the <xref:UserDefinedFunction>.

Returns