SqlStoredProcedureArgs

data class SqlStoredProcedureArgs(val accountName: Output<String>? = null, val body: Output<String>? = null, val containerName: Output<String>? = null, val databaseName: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null) : ConvertibleToJava<SqlStoredProcedureArgs>

Manages a SQL Stored Procedure within a Cosmos DB Account SQL Database.

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
exampleSqlStoredProcedure:
type: azure:cosmosdb:SqlStoredProcedure
name: example
properties:
name: test-stored-proc
resourceGroupName: ${example.resourceGroupName}
accountName: ${example.name}
databaseName: ${exampleSqlDatabase.name}
containerName: ${exampleSqlContainer.name}
body: |2
function () { var context = getContext(); var response = context.getResponse(); response.setBody('Hello, World'); }
variables:
example:
fn::invoke:
function: azure:cosmosdb:getAccount
arguments:
name: tfex-cosmosdb-account
resourceGroupName: tfex-cosmosdb-account-rg

Import

CosmosDB SQL Stored Procedures can be imported using the resource id, e.g.

$ pulumi import azure:cosmosdb/sqlStoredProcedure:SqlStoredProcedure db1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/account1/sqlDatabases/db1/containers/c1/storedProcedures/sp1

Constructors

Link copied to clipboard
constructor(accountName: Output<String>? = null, body: Output<String>? = null, containerName: Output<String>? = null, databaseName: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null)

Properties

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

The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created.

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

The body of the stored procedure.

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

The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created.

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

The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created.

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

Specifies the name of the Cosmos DB SQL Stored Procedure. Changing this forces a new resource to be created.

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

The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created.

Functions

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