import * as pulumi from "@pulumi/pulumi"; /** * Manages a Stream Analytics Output to CosmosDB. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const exampleResourceGroup = new azure.core.ResourceGroup("example", { * name: "rg-example", * location: "West Europe", * }); * const example = azure.streamanalytics.getJobOutput({ * name: "example-job", * resourceGroupName: exampleResourceGroup.name, * }); * const exampleAccount = new azure.cosmosdb.Account("example", { * name: "exampledb", * resourceGroupName: exampleResourceGroup.name, * location: exampleResourceGroup.location, * offerType: "Standard", * kind: "GlobalDocumentDB", * consistencyPolicy: { * consistencyLevel: "BoundedStaleness", * maxIntervalInSeconds: 10, * maxStalenessPrefix: 200, * }, * geoLocations: [{ * location: exampleResourceGroup.location, * failoverPriority: 0, * }], * }); * const exampleSqlDatabase = new azure.cosmosdb.SqlDatabase("example", { * name: "cosmos-sql-db", * resourceGroupName: exampleAccount.resourceGroupName, * accountName: exampleAccount.name, * throughput: 400, * }); * const exampleSqlContainer = new azure.cosmosdb.SqlContainer("example", { * name: "examplecontainer", * resourceGroupName: exampleAccount.resourceGroupName, * accountName: exampleAccount.name, * databaseName: exampleSqlDatabase.name, * partitionKeyPath: "foo", * }); * const exampleOutputCosmosdb = new azure.streamanalytics.OutputCosmosdb("example", { * name: "output-to-cosmosdb", * streamAnalyticsJobId: example.apply(example => example.id), * cosmosdbAccountKey: exampleAccount.primaryKey, * cosmosdbSqlDatabaseId: exampleSqlDatabase.id, * containerName: exampleSqlContainer.name, * documentId: "exampledocumentid", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.StreamAnalytics` - 2021-10-01-preview * * ## Import * * Stream Analytics Outputs for CosmosDB can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:streamanalytics/outputCosmosdb:OutputCosmosdb example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1 * ``` */ export declare class OutputCosmosdb extends pulumi.CustomResource { /** * Get an existing OutputCosmosdb 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?: OutputCosmosdbState, opts?: pulumi.CustomResourceOptions): OutputCosmosdb; /** * Returns true if the given object is an instance of OutputCosmosdb. 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 OutputCosmosdb; /** * The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. */ readonly authenticationMode: pulumi.Output; /** * The name of the CosmosDB container. */ readonly containerName: pulumi.Output; /** * The account key for the CosmosDB database. */ readonly cosmosdbAccountKey: pulumi.Output; /** * The ID of the CosmosDB database. */ readonly cosmosdbSqlDatabaseId: pulumi.Output; /** * The name of the field in output events used to specify the primary key which insert or update operations are based on. */ readonly documentId: pulumi.Output; /** * The name of the Stream Analytics Output. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. */ readonly partitionKey: pulumi.Output; /** * The ID of the Stream Analytics Job. Changing this forces a new resource to be created. */ readonly streamAnalyticsJobId: pulumi.Output; /** * Create a OutputCosmosdb 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: OutputCosmosdbArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering OutputCosmosdb resources. */ export interface OutputCosmosdbState { /** * The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. */ authenticationMode?: pulumi.Input; /** * The name of the CosmosDB container. */ containerName?: pulumi.Input; /** * The account key for the CosmosDB database. */ cosmosdbAccountKey?: pulumi.Input; /** * The ID of the CosmosDB database. */ cosmosdbSqlDatabaseId?: pulumi.Input; /** * The name of the field in output events used to specify the primary key which insert or update operations are based on. */ documentId?: pulumi.Input; /** * The name of the Stream Analytics Output. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. */ partitionKey?: pulumi.Input; /** * The ID of the Stream Analytics Job. Changing this forces a new resource to be created. */ streamAnalyticsJobId?: pulumi.Input; } /** * The set of arguments for constructing a OutputCosmosdb resource. */ export interface OutputCosmosdbArgs { /** * The authentication mode for the CosmosDB database. Possible values are `ConnectionString` and `Msi`. Defaults to `ConnectionString`. */ authenticationMode?: pulumi.Input; /** * The name of the CosmosDB container. */ containerName: pulumi.Input; /** * The account key for the CosmosDB database. */ cosmosdbAccountKey: pulumi.Input; /** * The ID of the CosmosDB database. */ cosmosdbSqlDatabaseId: pulumi.Input; /** * The name of the field in output events used to specify the primary key which insert or update operations are based on. */ documentId?: pulumi.Input; /** * The name of the Stream Analytics Output. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The name of the field in output events used to specify the key for partitioning output across collections. If `containerName` contains `{partition}` token, this property is required to be specified. */ partitionKey?: pulumi.Input; /** * The ID of the Stream Analytics Job. Changing this forces a new resource to be created. */ streamAnalyticsJobId: pulumi.Input; }