Trigger Class
- java.
lang. Object - JsonSerializable
- Resource
- com.
microsoft. azure. cosmosdb. Trigger
- com.
public class Trigger extends Resource
Represents a trigger in the Azure Cosmos DB database service.
Cosmos DB supports pre and post triggers defined in JavaScript to be executed on creates, updates and deletes. For additional details, refer to the server-side JavaScript API documentation.
Constructor Summary
Constructor | Description |
---|---|
Trigger() |
Constructor. |
Trigger(String jsonString) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getBody()
Get the body of the trigger. |
Trigger |
getTriggerOperation()
Get the operation type of the trigger. |
Trigger |
getTriggerType()
Get the type of the trigger. |
void |
setBody(String body)
Set the body of the trigger. |
void |
setTriggerOperation(TriggerOperation triggerOperation)
Set the operation type of the trigger. |
void |
setTriggerType(TriggerType triggerType)
Set the type of the resource. |
Inherited Members
Constructor Details
Trigger
public Trigger()
Constructor.
Trigger
public Trigger(String jsonString)
Constructor.
Parameters:
Method Details
getBody
public String getBody()
Get the body of the trigger.
Returns:
getTriggerOperation
public TriggerOperation getTriggerOperation()
Get the operation type of the trigger.
Returns:
getTriggerType
public TriggerType getTriggerType()
Get the type of the trigger.
Returns:
setBody
public void setBody(String body)
Set the body of the trigger.
Parameters:
setTriggerOperation
public void setTriggerOperation(TriggerOperation triggerOperation)
Set the operation type of the trigger.
Parameters:
setTriggerType
public void setTriggerType(TriggerType triggerType)
Set the type of the resource.
Parameters:
Applies to
Azure SDK for Java