Output Cosmosdb Args
Manages a Stream Analytics Output to CosmosDB.
Example Usage
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
name: example
properties:
name: rg-example
location: West Europe
exampleAccount:
type: azure:cosmosdb:Account
name: example
properties:
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
exampleSqlDatabase:
type: azure:cosmosdb:SqlDatabase
name: example
properties:
name: cosmos-sql-db
resourceGroupName: ${exampleAccount.resourceGroupName}
accountName: ${exampleAccount.name}
throughput: 400
exampleSqlContainer:
type: azure:cosmosdb:SqlContainer
name: example
properties:
name: examplecontainer
resourceGroupName: ${exampleAccount.resourceGroupName}
accountName: ${exampleAccount.name}
databaseName: ${exampleSqlDatabase.name}
partitionKeyPath: foo
exampleOutputCosmosdb:
type: azure:streamanalytics:OutputCosmosdb
name: example
properties:
name: output-to-cosmosdb
streamAnalyticsJobId: ${example.id}
cosmosdbAccountKey: ${exampleAccount.primaryKey}
cosmosdbSqlDatabaseId: ${exampleSqlDatabase.id}
containerName: ${exampleSqlContainer.name}
documentId: exampledocumentid
variables:
example:
fn::invoke:
function: azure:streamanalytics:getJob
arguments:
name: example-job
resourceGroupName: ${exampleResourceGroup.name}
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.
$ pulumi import azure:streamanalytics/outputCosmosdb:OutputCosmosdb example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/outputs/output1
Constructors
Properties
The authentication mode for the CosmosDB database. Possible values are ConnectionString
and Msi
. Defaults to ConnectionString
.
The name of the CosmosDB container.
The account key for the CosmosDB database.
The ID of the CosmosDB database.
The name of the field in output events used to specify the primary key which insert or update operations are based on.
The name of the field in output events used to specify the key for partitioning output across collections. If container_name
contains {partition}
token, this property is required to be specified.
The ID of the Stream Analytics Job. Changing this forces a new resource to be created.