SqlTriggerArgs

data class SqlTriggerArgs(val body: Output<String>? = null, val containerId: Output<String>? = null, val name: Output<String>? = null, val operation: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<SqlTriggerArgs>

Manages an SQL Trigger.

Example Usage

resources:
exampleSqlDatabase:
type: azure:cosmosdb:SqlDatabase
name: example
properties:
name: tfex-cosmos-db
resourceGroupName: ${example.resourceGroupName}
accountName: ${example.name}
throughput: 400
exampleSqlContainer:
type: azure:cosmosdb:SqlContainer
name: example
properties:
name: example-container
resourceGroupName: ${example.resourceGroupName}
accountName: ${example.name}
databaseName: ${exampleSqlDatabase.name}
partitionKeyPath: /id
exampleSqlTrigger:
type: azure:cosmosdb:SqlTrigger
name: example
properties:
name: test-trigger
containerId: ${exampleSqlContainer.id}
body: function trigger(){}
operation: Delete
type: Post
variables:
example:
fn::invoke:
function: azure:cosmosdb:getAccount
arguments:
name: tfex-cosmosdb-account
resourceGroupName: tfex-cosmosdb-account-rg

Import

SQL Triggers can be imported using the resource id, e.g.

$ pulumi import azure:cosmosdb/sqlTrigger:SqlTrigger example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/sqlDatabases/database1/containers/container1/triggers/trigger1

Constructors

Link copied to clipboard
constructor(body: Output<String>? = null, containerId: Output<String>? = null, name: Output<String>? = null, operation: Output<String>? = null, type: Output<String>? = null)

Properties

Link copied to clipboard
val body: Output<String>? = null

Body of the Trigger.

Link copied to clipboard
val containerId: Output<String>? = null

The id of the Cosmos DB SQL Container to create the SQL Trigger within. Changing this forces a new SQL Trigger to be created.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this SQL Trigger. Changing this forces a new SQL Trigger to be created.

Link copied to clipboard
val operation: Output<String>? = null

The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace.

Link copied to clipboard
val type: Output<String>? = null

Type of the Trigger. Possible values are Pre and Post.

Functions

Link copied to clipboard
open override fun toJava(): SqlTriggerArgs