import * as pulumi from "@pulumi/pulumi"; /** * Manages an SQL User Defined Function. * * ## 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 exampleSqlFunction = new azure.cosmosdb.SqlFunction("example", { * name: "test-function", * containerId: exampleSqlContainer.id, * body: "function trigger(){}", * }); * ``` * * ## Import * * SQL User Defined Functions can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:cosmosdb/sqlFunction:SqlFunction example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DocumentDB/databaseAccounts/account1/sqlDatabases/database1/containers/container1/userDefinedFunctions/userDefinedFunction1 * ``` */ export declare class SqlFunction extends pulumi.CustomResource { /** * Get an existing SqlFunction 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?: SqlFunctionState, opts?: pulumi.CustomResourceOptions): SqlFunction; /** * Returns true if the given object is an instance of SqlFunction. 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 SqlFunction; /** * Body of the User Defined Function. */ readonly body: pulumi.Output; /** * The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. */ readonly containerId: pulumi.Output; /** * The name which should be used for this SQL User Defined Function. Changing this forces a new SQL User Defined Function to be created. */ readonly name: pulumi.Output; /** * Create a SqlFunction 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: SqlFunctionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SqlFunction resources. */ export interface SqlFunctionState { /** * Body of the User Defined Function. */ body?: pulumi.Input; /** * The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. */ containerId?: pulumi.Input; /** * The name which should be used for this SQL User Defined Function. Changing this forces a new SQL User Defined Function to be created. */ name?: pulumi.Input; } /** * The set of arguments for constructing a SqlFunction resource. */ export interface SqlFunctionArgs { /** * Body of the User Defined Function. */ body: pulumi.Input; /** * The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. */ containerId: pulumi.Input; /** * The name which should be used for this SQL User Defined Function. Changing this forces a new SQL User Defined Function to be created. */ name?: pulumi.Input; }