import * as pulumi from "@pulumi/pulumi"; /** * Manages a SQL Stored Procedure within a Cosmos DB Account SQL Database. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = azure.cosmosdb.getAccount({ * name: "tfex-cosmosdb-account", * resourceGroupName: "tfex-cosmosdb-account-rg", * }); * const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("example", { * name: "tfex-cosmos-db", * resourceGroupName: example.then(example => example.resourceGroupName), * accountName: example.then(example => example.name), * throughput: 400, * }); * const exampleSqlContainer = new azure.cosmosdb.SqlContainer("example", { * name: "example-container", * resourceGroupName: example.then(example => example.resourceGroupName), * accountName: example.then(example => example.name), * databaseName: exampleSqlDatabase.name, * partitionKeyPath: "/id", * }); * const exampleSqlStoredProcedure = new azure.cosmosdb.SqlStoredProcedure("example", { * name: "test-stored-proc", * resourceGroupName: example.then(example => example.resourceGroupName), * accountName: example.then(example => example.name), * databaseName: exampleSqlDatabase.name, * containerName: exampleSqlContainer.name, * body: " function () { var context = getContext(); var response = context.getResponse(); response.setBody('Hello, World'); }\n", * }); * ``` * * ## Import * * CosmosDB SQL Stored Procedures can be imported using the `resource id`, e.g. * * ```sh * $ 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 * ``` */ export declare class SqlStoredProcedure extends pulumi.CustomResource { /** * Get an existing SqlStoredProcedure resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SqlStoredProcedureState, opts?: pulumi.CustomResourceOptions): SqlStoredProcedure; /** * Returns true if the given object is an instance of SqlStoredProcedure. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SqlStoredProcedure; /** * The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. */ readonly accountName: pulumi.Output; /** * The body of the stored procedure. */ readonly body: pulumi.Output; /** * The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. */ readonly containerName: pulumi.Output; /** * The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. */ readonly databaseName: pulumi.Output; /** * Specifies the name of the Cosmos DB SQL Stored Procedure. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * Create a SqlStoredProcedure resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SqlStoredProcedureArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SqlStoredProcedure resources. */ export interface SqlStoredProcedureState { /** * The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. */ accountName?: pulumi.Input; /** * The body of the stored procedure. */ body?: pulumi.Input; /** * The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. */ containerName?: pulumi.Input; /** * The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. */ databaseName?: pulumi.Input; /** * Specifies the name of the Cosmos DB SQL Stored Procedure. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; } /** * The set of arguments for constructing a SqlStoredProcedure resource. */ export interface SqlStoredProcedureArgs { /** * The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. */ accountName: pulumi.Input; /** * The body of the stored procedure. */ body: pulumi.Input; /** * The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. */ containerName: pulumi.Input; /** * The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. */ databaseName: pulumi.Input; /** * Specifies the name of the Cosmos DB SQL Stored Procedure. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; }