We recommend using Azure Native.
azure.streamanalytics.OutputCosmosdb
Explore with Pulumi AI
Manages a Stream Analytics Output to CosmosDB.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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}
Create OutputCosmosdb Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OutputCosmosdb(name: string, args: OutputCosmosdbArgs, opts?: CustomResourceOptions);
@overload
def OutputCosmosdb(resource_name: str,
args: OutputCosmosdbArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OutputCosmosdb(resource_name: str,
opts: Optional[ResourceOptions] = None,
container_name: Optional[str] = None,
cosmosdb_account_key: Optional[str] = None,
cosmosdb_sql_database_id: Optional[str] = None,
stream_analytics_job_id: Optional[str] = None,
document_id: Optional[str] = None,
name: Optional[str] = None,
partition_key: Optional[str] = None)
func NewOutputCosmosdb(ctx *Context, name string, args OutputCosmosdbArgs, opts ...ResourceOption) (*OutputCosmosdb, error)
public OutputCosmosdb(string name, OutputCosmosdbArgs args, CustomResourceOptions? opts = null)
public OutputCosmosdb(String name, OutputCosmosdbArgs args)
public OutputCosmosdb(String name, OutputCosmosdbArgs args, CustomResourceOptions options)
type: azure:streamanalytics:OutputCosmosdb
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 OutputCosmosdbArgs
- 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 OutputCosmosdbArgs
- 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 OutputCosmosdbArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OutputCosmosdbArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OutputCosmosdbArgs
- 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 outputCosmosdbResource = new Azure.StreamAnalytics.OutputCosmosdb("outputCosmosdbResource", new()
{
ContainerName = "string",
CosmosdbAccountKey = "string",
CosmosdbSqlDatabaseId = "string",
StreamAnalyticsJobId = "string",
DocumentId = "string",
Name = "string",
PartitionKey = "string",
});
example, err := streamanalytics.NewOutputCosmosdb(ctx, "outputCosmosdbResource", &streamanalytics.OutputCosmosdbArgs{
ContainerName: pulumi.String("string"),
CosmosdbAccountKey: pulumi.String("string"),
CosmosdbSqlDatabaseId: pulumi.String("string"),
StreamAnalyticsJobId: pulumi.String("string"),
DocumentId: pulumi.String("string"),
Name: pulumi.String("string"),
PartitionKey: pulumi.String("string"),
})
var outputCosmosdbResource = new OutputCosmosdb("outputCosmosdbResource", OutputCosmosdbArgs.builder()
.containerName("string")
.cosmosdbAccountKey("string")
.cosmosdbSqlDatabaseId("string")
.streamAnalyticsJobId("string")
.documentId("string")
.name("string")
.partitionKey("string")
.build());
output_cosmosdb_resource = azure.streamanalytics.OutputCosmosdb("outputCosmosdbResource",
container_name="string",
cosmosdb_account_key="string",
cosmosdb_sql_database_id="string",
stream_analytics_job_id="string",
document_id="string",
name="string",
partition_key="string")
const outputCosmosdbResource = new azure.streamanalytics.OutputCosmosdb("outputCosmosdbResource", {
containerName: "string",
cosmosdbAccountKey: "string",
cosmosdbSqlDatabaseId: "string",
streamAnalyticsJobId: "string",
documentId: "string",
name: "string",
partitionKey: "string",
});
type: azure:streamanalytics:OutputCosmosdb
properties:
containerName: string
cosmosdbAccountKey: string
cosmosdbSqlDatabaseId: string
documentId: string
name: string
partitionKey: string
streamAnalyticsJobId: string
OutputCosmosdb 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 OutputCosmosdb resource accepts the following input properties:
- Container
Name string - The name of the CosmosDB container.
- Cosmosdb
Account stringKey - The account key for the CosmosDB database.
- Cosmosdb
Sql stringDatabase Id - The ID of the CosmosDB database.
- Stream
Analytics stringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- Document
Id string - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- Name string
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- Partition
Key string - 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.
- Container
Name string - The name of the CosmosDB container.
- Cosmosdb
Account stringKey - The account key for the CosmosDB database.
- Cosmosdb
Sql stringDatabase Id - The ID of the CosmosDB database.
- Stream
Analytics stringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- Document
Id string - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- Name string
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- Partition
Key string - 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.
- container
Name String - The name of the CosmosDB container.
- cosmosdb
Account StringKey - The account key for the CosmosDB database.
- cosmosdb
Sql StringDatabase Id - The ID of the CosmosDB database.
- stream
Analytics StringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- document
Id String - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name String
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition
Key String - 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.
- container
Name string - The name of the CosmosDB container.
- cosmosdb
Account stringKey - The account key for the CosmosDB database.
- cosmosdb
Sql stringDatabase Id - The ID of the CosmosDB database.
- stream
Analytics stringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- document
Id string - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name string
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition
Key string - 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.
- container_
name str - The name of the CosmosDB container.
- cosmosdb_
account_ strkey - The account key for the CosmosDB database.
- cosmosdb_
sql_ strdatabase_ id - The ID of the CosmosDB database.
- stream_
analytics_ strjob_ id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- document_
id str - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name str
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition_
key str - 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.
- container
Name String - The name of the CosmosDB container.
- cosmosdb
Account StringKey - The account key for the CosmosDB database.
- cosmosdb
Sql StringDatabase Id - The ID of the CosmosDB database.
- stream
Analytics StringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- document
Id String - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name String
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition
Key String - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the OutputCosmosdb resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing OutputCosmosdb Resource
Get an existing OutputCosmosdb resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: OutputCosmosdbState, opts?: CustomResourceOptions): OutputCosmosdb
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
container_name: Optional[str] = None,
cosmosdb_account_key: Optional[str] = None,
cosmosdb_sql_database_id: Optional[str] = None,
document_id: Optional[str] = None,
name: Optional[str] = None,
partition_key: Optional[str] = None,
stream_analytics_job_id: Optional[str] = None) -> OutputCosmosdb
func GetOutputCosmosdb(ctx *Context, name string, id IDInput, state *OutputCosmosdbState, opts ...ResourceOption) (*OutputCosmosdb, error)
public static OutputCosmosdb Get(string name, Input<string> id, OutputCosmosdbState? state, CustomResourceOptions? opts = null)
public static OutputCosmosdb get(String name, Output<String> id, OutputCosmosdbState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Container
Name string - The name of the CosmosDB container.
- Cosmosdb
Account stringKey - The account key for the CosmosDB database.
- Cosmosdb
Sql stringDatabase Id - The ID of the CosmosDB database.
- Document
Id string - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- Name string
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- Partition
Key string - 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. - Stream
Analytics stringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- Container
Name string - The name of the CosmosDB container.
- Cosmosdb
Account stringKey - The account key for the CosmosDB database.
- Cosmosdb
Sql stringDatabase Id - The ID of the CosmosDB database.
- Document
Id string - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- Name string
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- Partition
Key string - 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. - Stream
Analytics stringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- container
Name String - The name of the CosmosDB container.
- cosmosdb
Account StringKey - The account key for the CosmosDB database.
- cosmosdb
Sql StringDatabase Id - The ID of the CosmosDB database.
- document
Id String - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name String
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition
Key String - 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. - stream
Analytics StringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- container
Name string - The name of the CosmosDB container.
- cosmosdb
Account stringKey - The account key for the CosmosDB database.
- cosmosdb
Sql stringDatabase Id - The ID of the CosmosDB database.
- document
Id string - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name string
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition
Key string - 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. - stream
Analytics stringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- container_
name str - The name of the CosmosDB container.
- cosmosdb_
account_ strkey - The account key for the CosmosDB database.
- cosmosdb_
sql_ strdatabase_ id - The ID of the CosmosDB database.
- document_
id str - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name str
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition_
key str - 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. - stream_
analytics_ strjob_ id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
- container
Name String - The name of the CosmosDB container.
- cosmosdb
Account StringKey - The account key for the CosmosDB database.
- cosmosdb
Sql StringDatabase Id - The ID of the CosmosDB database.
- document
Id String - The name of the field in output events used to specify the primary key which insert or update operations are based on.
- name String
- The name of the Stream Analytics Output. Changing this forces a new resource to be created.
- partition
Key String - 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. - stream
Analytics StringJob Id - The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.