azure-native.documentdb.SqlResourceSqlTrigger

Explore with Pulumi AI

An Azure Cosmos DB trigger. API Version: 2021-03-15.

Example Usage

CosmosDBSqlTriggerCreateUpdate

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var sqlResourceSqlTrigger = new AzureNative.DocumentDB.SqlResourceSqlTrigger("sqlResourceSqlTrigger", new()
    {
        AccountName = "ddb1",
        ContainerName = "containerName",
        DatabaseName = "databaseName",
        Options = null,
        Resource = new AzureNative.DocumentDB.Inputs.SqlTriggerResourceArgs
        {
            Body = "body",
            Id = "triggerName",
            TriggerOperation = "triggerOperation",
            TriggerType = "triggerType",
        },
        ResourceGroupName = "rg1",
        TriggerName = "triggerName",
    });

});
package main

import (
	documentdb "github.com/pulumi/pulumi-azure-native/sdk/go/azure/documentdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := documentdb.NewSqlResourceSqlTrigger(ctx, "sqlResourceSqlTrigger", &documentdb.SqlResourceSqlTriggerArgs{
			AccountName:   pulumi.String("ddb1"),
			ContainerName: pulumi.String("containerName"),
			DatabaseName:  pulumi.String("databaseName"),
			Options:       nil,
			Resource: &documentdb.SqlTriggerResourceArgs{
				Body:             pulumi.String("body"),
				Id:               pulumi.String("triggerName"),
				TriggerOperation: pulumi.String("triggerOperation"),
				TriggerType:      pulumi.String("triggerType"),
			},
			ResourceGroupName: pulumi.String("rg1"),
			TriggerName:       pulumi.String("triggerName"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.documentdb.SqlResourceSqlTrigger;
import com.pulumi.azurenative.documentdb.SqlResourceSqlTriggerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var sqlResourceSqlTrigger = new SqlResourceSqlTrigger("sqlResourceSqlTrigger", SqlResourceSqlTriggerArgs.builder()        
            .accountName("ddb1")
            .containerName("containerName")
            .databaseName("databaseName")
            .options()
            .resource(Map.ofEntries(
                Map.entry("body", "body"),
                Map.entry("id", "triggerName"),
                Map.entry("triggerOperation", "triggerOperation"),
                Map.entry("triggerType", "triggerType")
            ))
            .resourceGroupName("rg1")
            .triggerName("triggerName")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

sql_resource_sql_trigger = azure_native.documentdb.SqlResourceSqlTrigger("sqlResourceSqlTrigger",
    account_name="ddb1",
    container_name="containerName",
    database_name="databaseName",
    options=azure_native.documentdb.CreateUpdateOptionsArgs(),
    resource=azure_native.documentdb.SqlTriggerResourceArgs(
        body="body",
        id="triggerName",
        trigger_operation="triggerOperation",
        trigger_type="triggerType",
    ),
    resource_group_name="rg1",
    trigger_name="triggerName")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const sqlResourceSqlTrigger = new azure_native.documentdb.SqlResourceSqlTrigger("sqlResourceSqlTrigger", {
    accountName: "ddb1",
    containerName: "containerName",
    databaseName: "databaseName",
    options: {},
    resource: {
        body: "body",
        id: "triggerName",
        triggerOperation: "triggerOperation",
        triggerType: "triggerType",
    },
    resourceGroupName: "rg1",
    triggerName: "triggerName",
});
resources:
  sqlResourceSqlTrigger:
    type: azure-native:documentdb:SqlResourceSqlTrigger
    properties:
      accountName: ddb1
      containerName: containerName
      databaseName: databaseName
      options: {}
      resource:
        body: body
        id: triggerName
        triggerOperation: triggerOperation
        triggerType: triggerType
      resourceGroupName: rg1
      triggerName: triggerName

Create SqlResourceSqlTrigger Resource

new SqlResourceSqlTrigger(name: string, args: SqlResourceSqlTriggerArgs, opts?: CustomResourceOptions);
@overload
def SqlResourceSqlTrigger(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          account_name: Optional[str] = None,
                          container_name: Optional[str] = None,
                          database_name: Optional[str] = None,
                          location: Optional[str] = None,
                          options: Optional[CreateUpdateOptionsArgs] = None,
                          resource: Optional[SqlTriggerResourceArgs] = None,
                          resource_group_name: Optional[str] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          trigger_name: Optional[str] = None)
@overload
def SqlResourceSqlTrigger(resource_name: str,
                          args: SqlResourceSqlTriggerArgs,
                          opts: Optional[ResourceOptions] = None)
func NewSqlResourceSqlTrigger(ctx *Context, name string, args SqlResourceSqlTriggerArgs, opts ...ResourceOption) (*SqlResourceSqlTrigger, error)
public SqlResourceSqlTrigger(string name, SqlResourceSqlTriggerArgs args, CustomResourceOptions? opts = null)
public SqlResourceSqlTrigger(String name, SqlResourceSqlTriggerArgs args)
public SqlResourceSqlTrigger(String name, SqlResourceSqlTriggerArgs args, CustomResourceOptions options)
type: azure-native:documentdb:SqlResourceSqlTrigger
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args SqlResourceSqlTriggerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args SqlResourceSqlTriggerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args SqlResourceSqlTriggerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SqlResourceSqlTriggerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args SqlResourceSqlTriggerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

SqlResourceSqlTrigger Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The SqlResourceSqlTrigger resource accepts the following input properties:

AccountName string

Cosmos DB database account name.

ContainerName string

Cosmos DB container name.

DatabaseName string

Cosmos DB database name.

Resource Pulumi.AzureNative.DocumentDB.Inputs.SqlTriggerResourceArgs

The standard JSON format of a trigger

ResourceGroupName string

The name of the resource group. The name is case insensitive.

Location string

The location of the resource group to which the resource belongs.

Options Pulumi.AzureNative.DocumentDB.Inputs.CreateUpdateOptionsArgs

A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

Tags Dictionary<string, string>

Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

TriggerName string

Cosmos DB trigger name.

AccountName string

Cosmos DB database account name.

ContainerName string

Cosmos DB container name.

DatabaseName string

Cosmos DB database name.

Resource SqlTriggerResourceArgs

The standard JSON format of a trigger

ResourceGroupName string

The name of the resource group. The name is case insensitive.

Location string

The location of the resource group to which the resource belongs.

Options CreateUpdateOptionsArgs

A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

Tags map[string]string

Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

TriggerName string

Cosmos DB trigger name.

accountName String

Cosmos DB database account name.

containerName String

Cosmos DB container name.

databaseName String

Cosmos DB database name.

resource SqlTriggerResourceArgs

The standard JSON format of a trigger

resourceGroupName String

The name of the resource group. The name is case insensitive.

location String

The location of the resource group to which the resource belongs.

options CreateUpdateOptionsArgs

A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

tags Map<String,String>

Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

triggerName String

Cosmos DB trigger name.

accountName string

Cosmos DB database account name.

containerName string

Cosmos DB container name.

databaseName string

Cosmos DB database name.

resource SqlTriggerResourceArgs

The standard JSON format of a trigger

resourceGroupName string

The name of the resource group. The name is case insensitive.

location string

The location of the resource group to which the resource belongs.

options CreateUpdateOptionsArgs

A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

tags {[key: string]: string}

Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

triggerName string

Cosmos DB trigger name.

account_name str

Cosmos DB database account name.

container_name str

Cosmos DB container name.

database_name str

Cosmos DB database name.

resource SqlTriggerResourceArgs

The standard JSON format of a trigger

resource_group_name str

The name of the resource group. The name is case insensitive.

location str

The location of the resource group to which the resource belongs.

options CreateUpdateOptionsArgs

A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

tags Mapping[str, str]

Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

trigger_name str

Cosmos DB trigger name.

accountName String

Cosmos DB database account name.

containerName String

Cosmos DB container name.

databaseName String

Cosmos DB database name.

resource Property Map

The standard JSON format of a trigger

resourceGroupName String

The name of the resource group. The name is case insensitive.

location String

The location of the resource group to which the resource belongs.

options Property Map

A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.

tags Map<String>

Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".

triggerName String

Cosmos DB trigger name.

Outputs

All input properties are implicitly available as output properties. Additionally, the SqlResourceSqlTrigger resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the ARM resource.

Type string

The type of Azure resource.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the ARM resource.

Type string

The type of Azure resource.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the ARM resource.

type String

The type of Azure resource.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the ARM resource.

type string

The type of Azure resource.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the ARM resource.

type str

The type of Azure resource.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the ARM resource.

type String

The type of Azure resource.

Supporting Types

AutoscaleSettings

MaxThroughput int

Represents maximum throughput, the resource can scale up to.

MaxThroughput int

Represents maximum throughput, the resource can scale up to.

maxThroughput Integer

Represents maximum throughput, the resource can scale up to.

maxThroughput number

Represents maximum throughput, the resource can scale up to.

max_throughput int

Represents maximum throughput, the resource can scale up to.

maxThroughput Number

Represents maximum throughput, the resource can scale up to.

CreateUpdateOptions

AutoscaleSettings Pulumi.AzureNative.DocumentDB.Inputs.AutoscaleSettings

Specifies the Autoscale settings.

Throughput int

Request Units per second. For example, "throughput": 10000.

AutoscaleSettings AutoscaleSettings

Specifies the Autoscale settings.

Throughput int

Request Units per second. For example, "throughput": 10000.

autoscaleSettings AutoscaleSettings

Specifies the Autoscale settings.

throughput Integer

Request Units per second. For example, "throughput": 10000.

autoscaleSettings AutoscaleSettings

Specifies the Autoscale settings.

throughput number

Request Units per second. For example, "throughput": 10000.

autoscale_settings AutoscaleSettings

Specifies the Autoscale settings.

throughput int

Request Units per second. For example, "throughput": 10000.

autoscaleSettings Property Map

Specifies the Autoscale settings.

throughput Number

Request Units per second. For example, "throughput": 10000.

SqlTriggerGetPropertiesResponseResource

Etag string

A system generated property representing the resource etag required for optimistic concurrency control.

Id string

Name of the Cosmos DB SQL trigger

Rid string

A system generated property. A unique identifier.

Ts double

A system generated property that denotes the last updated timestamp of the resource.

Body string

Body of the Trigger

TriggerOperation string

The operation the trigger is associated with

TriggerType string

Type of the Trigger

Etag string

A system generated property representing the resource etag required for optimistic concurrency control.

Id string

Name of the Cosmos DB SQL trigger

Rid string

A system generated property. A unique identifier.

Ts float64

A system generated property that denotes the last updated timestamp of the resource.

Body string

Body of the Trigger

TriggerOperation string

The operation the trigger is associated with

TriggerType string

Type of the Trigger

etag String

A system generated property representing the resource etag required for optimistic concurrency control.

id String

Name of the Cosmos DB SQL trigger

rid String

A system generated property. A unique identifier.

ts Double

A system generated property that denotes the last updated timestamp of the resource.

body String

Body of the Trigger

triggerOperation String

The operation the trigger is associated with

triggerType String

Type of the Trigger

etag string

A system generated property representing the resource etag required for optimistic concurrency control.

id string

Name of the Cosmos DB SQL trigger

rid string

A system generated property. A unique identifier.

ts number

A system generated property that denotes the last updated timestamp of the resource.

body string

Body of the Trigger

triggerOperation string

The operation the trigger is associated with

triggerType string

Type of the Trigger

etag str

A system generated property representing the resource etag required for optimistic concurrency control.

id str

Name of the Cosmos DB SQL trigger

rid str

A system generated property. A unique identifier.

ts float

A system generated property that denotes the last updated timestamp of the resource.

body str

Body of the Trigger

trigger_operation str

The operation the trigger is associated with

trigger_type str

Type of the Trigger

etag String

A system generated property representing the resource etag required for optimistic concurrency control.

id String

Name of the Cosmos DB SQL trigger

rid String

A system generated property. A unique identifier.

ts Number

A system generated property that denotes the last updated timestamp of the resource.

body String

Body of the Trigger

triggerOperation String

The operation the trigger is associated with

triggerType String

Type of the Trigger

SqlTriggerResource

Id string

Name of the Cosmos DB SQL trigger

Body string

Body of the Trigger

TriggerOperation string | Pulumi.AzureNative.DocumentDB.TriggerOperation

The operation the trigger is associated with

TriggerType string | Pulumi.AzureNative.DocumentDB.TriggerType

Type of the Trigger

Id string

Name of the Cosmos DB SQL trigger

Body string

Body of the Trigger

TriggerOperation string | TriggerOperation

The operation the trigger is associated with

TriggerType string | TriggerType

Type of the Trigger

id String

Name of the Cosmos DB SQL trigger

body String

Body of the Trigger

triggerOperation String | TriggerOperation

The operation the trigger is associated with

triggerType String | TriggerType

Type of the Trigger

id string

Name of the Cosmos DB SQL trigger

body string

Body of the Trigger

triggerOperation string | TriggerOperation

The operation the trigger is associated with

triggerType string | TriggerType

Type of the Trigger

id str

Name of the Cosmos DB SQL trigger

body str

Body of the Trigger

trigger_operation str | TriggerOperation

The operation the trigger is associated with

trigger_type str | TriggerType

Type of the Trigger

id String

Name of the Cosmos DB SQL trigger

body String

Body of the Trigger

triggerOperation String | "All" | "Create" | "Update" | "Delete" | "Replace"

The operation the trigger is associated with

triggerType String | "Pre" | "Post"

Type of the Trigger

TriggerOperation

All
All
Create
Create
Update
Update
Delete
Delete
Replace
Replace
TriggerOperationAll
All
TriggerOperationCreate
Create
TriggerOperationUpdate
Update
TriggerOperationDelete
Delete
TriggerOperationReplace
Replace
All
All
Create
Create
Update
Update
Delete
Delete
Replace
Replace
All
All
Create
Create
Update
Update
Delete
Delete
Replace
Replace
ALL
All
CREATE
Create
UPDATE
Update
DELETE
Delete
REPLACE
Replace
"All"
All
"Create"
Create
"Update"
Update
"Delete"
Delete
"Replace"
Replace

TriggerType

Pre
Pre
Post
Post
TriggerTypePre
Pre
TriggerTypePost
Post
Pre
Pre
Post
Post
Pre
Pre
Post
Post
PRE
Pre
POST
Post
"Pre"
Pre
"Post"
Post

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:documentdb:SqlResourceSqlTrigger triggerName /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlTriggers/triggerName 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0