1. Packages
  2. Azure Native v1
  3. API Docs
  4. documentdb
  5. SqlResourceSqlStoredProcedure
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.documentdb.SqlResourceSqlStoredProcedure

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

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

    Example Usage

    CosmosDBSqlStoredProcedureCreateUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var sqlResourceSqlStoredProcedure = new AzureNative.DocumentDB.SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedure", new()
        {
            AccountName = "ddb1",
            ContainerName = "containerName",
            DatabaseName = "databaseName",
            Options = null,
            Resource = new AzureNative.DocumentDB.Inputs.SqlStoredProcedureResourceArgs
            {
                Body = "body",
                Id = "storedProcedureName",
            },
            ResourceGroupName = "rg1",
            StoredProcedureName = "storedProcedureName",
        });
    
    });
    
    package main
    
    import (
    	documentdb "github.com/pulumi/pulumi-azure-native-sdk/documentdb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := documentdb.NewSqlResourceSqlStoredProcedure(ctx, "sqlResourceSqlStoredProcedure", &documentdb.SqlResourceSqlStoredProcedureArgs{
    			AccountName:   pulumi.String("ddb1"),
    			ContainerName: pulumi.String("containerName"),
    			DatabaseName:  pulumi.String("databaseName"),
    			Options:       nil,
    			Resource: &documentdb.SqlStoredProcedureResourceArgs{
    				Body: pulumi.String("body"),
    				Id:   pulumi.String("storedProcedureName"),
    			},
    			ResourceGroupName:   pulumi.String("rg1"),
    			StoredProcedureName: pulumi.String("storedProcedureName"),
    		})
    		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.SqlResourceSqlStoredProcedure;
    import com.pulumi.azurenative.documentdb.SqlResourceSqlStoredProcedureArgs;
    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 sqlResourceSqlStoredProcedure = new SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedure", SqlResourceSqlStoredProcedureArgs.builder()        
                .accountName("ddb1")
                .containerName("containerName")
                .databaseName("databaseName")
                .options()
                .resource(Map.ofEntries(
                    Map.entry("body", "body"),
                    Map.entry("id", "storedProcedureName")
                ))
                .resourceGroupName("rg1")
                .storedProcedureName("storedProcedureName")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    sql_resource_sql_stored_procedure = azure_native.documentdb.SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedure",
        account_name="ddb1",
        container_name="containerName",
        database_name="databaseName",
        options=azure_native.documentdb.CreateUpdateOptionsArgs(),
        resource=azure_native.documentdb.SqlStoredProcedureResourceArgs(
            body="body",
            id="storedProcedureName",
        ),
        resource_group_name="rg1",
        stored_procedure_name="storedProcedureName")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const sqlResourceSqlStoredProcedure = new azure_native.documentdb.SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedure", {
        accountName: "ddb1",
        containerName: "containerName",
        databaseName: "databaseName",
        options: {},
        resource: {
            body: "body",
            id: "storedProcedureName",
        },
        resourceGroupName: "rg1",
        storedProcedureName: "storedProcedureName",
    });
    
    resources:
      sqlResourceSqlStoredProcedure:
        type: azure-native:documentdb:SqlResourceSqlStoredProcedure
        properties:
          accountName: ddb1
          containerName: containerName
          databaseName: databaseName
          options: {}
          resource:
            body: body
            id: storedProcedureName
          resourceGroupName: rg1
          storedProcedureName: storedProcedureName
    

    Create SqlResourceSqlStoredProcedure Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args SqlResourceSqlStoredProcedureArgs
    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 SqlResourceSqlStoredProcedureArgs
    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 SqlResourceSqlStoredProcedureArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SqlResourceSqlStoredProcedureArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SqlResourceSqlStoredProcedureArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var sqlResourceSqlStoredProcedureResource = new AzureNative.Documentdb.SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedureResource", new()
    {
        AccountName = "string",
        ContainerName = "string",
        DatabaseName = "string",
        Resource = 
        {
            { "id", "string" },
            { "body", "string" },
        },
        ResourceGroupName = "string",
        Location = "string",
        Options = 
        {
            { "autoscaleSettings", 
            {
                { "maxThroughput", 0 },
            } },
            { "throughput", 0 },
        },
        StoredProcedureName = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := documentdb.NewSqlResourceSqlStoredProcedure(ctx, "sqlResourceSqlStoredProcedureResource", &documentdb.SqlResourceSqlStoredProcedureArgs{
    	AccountName:   "string",
    	ContainerName: "string",
    	DatabaseName:  "string",
    	Resource: map[string]interface{}{
    		"id":   "string",
    		"body": "string",
    	},
    	ResourceGroupName: "string",
    	Location:          "string",
    	Options: map[string]interface{}{
    		"autoscaleSettings": map[string]interface{}{
    			"maxThroughput": 0,
    		},
    		"throughput": 0,
    	},
    	StoredProcedureName: "string",
    	Tags: map[string]interface{}{
    		"string": "string",
    	},
    })
    
    var sqlResourceSqlStoredProcedureResource = new SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedureResource", SqlResourceSqlStoredProcedureArgs.builder()
        .accountName("string")
        .containerName("string")
        .databaseName("string")
        .resource(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .resourceGroupName("string")
        .location("string")
        .options(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .storedProcedureName("string")
        .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .build());
    
    sql_resource_sql_stored_procedure_resource = azure_native.documentdb.SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedureResource",
        account_name=string,
        container_name=string,
        database_name=string,
        resource={
            id: string,
            body: string,
        },
        resource_group_name=string,
        location=string,
        options={
            autoscaleSettings: {
                maxThroughput: 0,
            },
            throughput: 0,
        },
        stored_procedure_name=string,
        tags={
            string: string,
        })
    
    const sqlResourceSqlStoredProcedureResource = new azure_native.documentdb.SqlResourceSqlStoredProcedure("sqlResourceSqlStoredProcedureResource", {
        accountName: "string",
        containerName: "string",
        databaseName: "string",
        resource: {
            id: "string",
            body: "string",
        },
        resourceGroupName: "string",
        location: "string",
        options: {
            autoscaleSettings: {
                maxThroughput: 0,
            },
            throughput: 0,
        },
        storedProcedureName: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:documentdb:SqlResourceSqlStoredProcedure
    properties:
        accountName: string
        containerName: string
        databaseName: string
        location: string
        options:
            autoscaleSettings:
                maxThroughput: 0
            throughput: 0
        resource:
            body: string
            id: string
        resourceGroupName: string
        storedProcedureName: string
        tags:
            string: string
    

    SqlResourceSqlStoredProcedure Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SqlResourceSqlStoredProcedure 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.SqlStoredProcedureResource
    The standard JSON format of a storedProcedure
    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.CreateUpdateOptions
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    StoredProcedureName string
    Cosmos DB storedProcedure name.
    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".
    AccountName string
    Cosmos DB database account name.
    ContainerName string
    Cosmos DB container name.
    DatabaseName string
    Cosmos DB database name.
    Resource SqlStoredProcedureResourceArgs
    The standard JSON format of a storedProcedure
    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.
    StoredProcedureName string
    Cosmos DB storedProcedure name.
    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".
    accountName String
    Cosmos DB database account name.
    containerName String
    Cosmos DB container name.
    databaseName String
    Cosmos DB database name.
    resource SqlStoredProcedureResource
    The standard JSON format of a storedProcedure
    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 CreateUpdateOptions
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    storedProcedureName String
    Cosmos DB storedProcedure name.
    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".
    accountName string
    Cosmos DB database account name.
    containerName string
    Cosmos DB container name.
    databaseName string
    Cosmos DB database name.
    resource SqlStoredProcedureResource
    The standard JSON format of a storedProcedure
    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 CreateUpdateOptions
    A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request.
    storedProcedureName string
    Cosmos DB storedProcedure name.
    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".
    account_name str
    Cosmos DB database account name.
    container_name str
    Cosmos DB container name.
    database_name str
    Cosmos DB database name.
    resource SqlStoredProcedureResourceArgs
    The standard JSON format of a storedProcedure
    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.
    stored_procedure_name str
    Cosmos DB storedProcedure name.
    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".
    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 storedProcedure
    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.
    storedProcedureName String
    Cosmos DB storedProcedure name.
    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".

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SqlResourceSqlStoredProcedure 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, AutoscaleSettingsArgs

    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, CreateUpdateOptionsArgs

    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.

    SqlStoredProcedureGetPropertiesResponseResource, SqlStoredProcedureGetPropertiesResponseResourceArgs

    Etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    Id string
    Name of the Cosmos DB SQL storedProcedure
    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 Stored Procedure
    Etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    Id string
    Name of the Cosmos DB SQL storedProcedure
    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 Stored Procedure
    etag String
    A system generated property representing the resource etag required for optimistic concurrency control.
    id String
    Name of the Cosmos DB SQL storedProcedure
    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 Stored Procedure
    etag string
    A system generated property representing the resource etag required for optimistic concurrency control.
    id string
    Name of the Cosmos DB SQL storedProcedure
    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 Stored Procedure
    etag str
    A system generated property representing the resource etag required for optimistic concurrency control.
    id str
    Name of the Cosmos DB SQL storedProcedure
    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 Stored Procedure
    etag String
    A system generated property representing the resource etag required for optimistic concurrency control.
    id String
    Name of the Cosmos DB SQL storedProcedure
    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 Stored Procedure

    SqlStoredProcedureResource, SqlStoredProcedureResourceArgs

    Id string
    Name of the Cosmos DB SQL storedProcedure
    Body string
    Body of the Stored Procedure
    Id string
    Name of the Cosmos DB SQL storedProcedure
    Body string
    Body of the Stored Procedure
    id String
    Name of the Cosmos DB SQL storedProcedure
    body String
    Body of the Stored Procedure
    id string
    Name of the Cosmos DB SQL storedProcedure
    body string
    Body of the Stored Procedure
    id str
    Name of the Cosmos DB SQL storedProcedure
    body str
    Body of the Stored Procedure
    id String
    Name of the Cosmos DB SQL storedProcedure
    body String
    Body of the Stored Procedure

    Import

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

    $ pulumi import azure-native:documentdb:SqlResourceSqlStoredProcedure storedProcedureName /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName/sqlStoredProcedures/storedProcedureName 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi