Table of Contents

Class TriggerProperties

Namespace
Microsoft.Azure.Cosmos.Scripts
Assembly
Microsoft.Azure.Cosmos.Client.dll

Represents a trigger in the Azure Cosmos DB service.

public class TriggerProperties
Inheritance
TriggerProperties
Inherited Members
Extension Methods

Remarks

Azure Cosmos DB supports pre and post triggers written in JavaScript to be executed on creates, updates and deletes. For additional details, refer to the server-side JavaScript API documentation.

Constructors

TriggerProperties()

public TriggerProperties()

Properties

Body

Gets or sets the body of the trigger for the Azure Cosmos DB service.

public string Body { get; set; }

Property Value

string

The body of the trigger.

ETag

Gets the entity tag associated with the resource from the Azure Cosmos DB service.

public string ETag { get; }

Property Value

string

The entity tag associated with the resource.

Remarks

ETags are used for concurrency checking when updating resources.

Id

Gets or sets the Id of the resource in the Azure Cosmos DB service.

public string Id { get; set; }

Property Value

string

The Id associated with the resource.

Remarks

Every resource within an Azure Cosmos DB database account needs to have a unique identifier. Unlike Microsoft.Azure.Documents.Resource.ResourceId, which is set internally, this Id is settable by the user and is not immutable.

The following characters are restricted and cannot be used in the Id property: '/', '\\', '?', '#'

Gets the self-link associated with the resource from the Azure Cosmos DB service.

public string SelfLink { get; }

Property Value

string

The self-link associated with the resource.

A self-link is a static addressable Uri for each resource within a database account and follows the Azure Cosmos DB resource model. E.g. a self-link for a document could be dbs/db_resourceid/colls/coll_resourceid/documents/doc_resourceid

TriggerOperation

Gets or sets the operation the trigger is associated with for the Azure Cosmos DB service.

public TriggerOperation TriggerOperation { get; set; }

Property Value

TriggerOperation

The operation the trigger is associated with.

See Also

TriggerType

Gets or sets the type of the trigger for the Azure Cosmos DB service.

public TriggerType TriggerType { get; set; }

Property Value

TriggerType

The body of the trigger.

See Also