1. Packages
  2. Azure Classic
  3. API Docs
  4. streamanalytics
  5. OutputCosmosdb

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.streamanalytics.OutputCosmosdb

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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:

    ContainerName string
    The name of the CosmosDB container.
    CosmosdbAccountKey string
    The account key for the CosmosDB database.
    CosmosdbSqlDatabaseId string
    The ID of the CosmosDB database.
    StreamAnalyticsJobId string
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    DocumentId 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.
    PartitionKey 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.
    ContainerName string
    The name of the CosmosDB container.
    CosmosdbAccountKey string
    The account key for the CosmosDB database.
    CosmosdbSqlDatabaseId string
    The ID of the CosmosDB database.
    StreamAnalyticsJobId string
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    DocumentId 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.
    PartitionKey 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.
    containerName String
    The name of the CosmosDB container.
    cosmosdbAccountKey String
    The account key for the CosmosDB database.
    cosmosdbSqlDatabaseId String
    The ID of the CosmosDB database.
    streamAnalyticsJobId String
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    documentId 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.
    partitionKey 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.
    containerName string
    The name of the CosmosDB container.
    cosmosdbAccountKey string
    The account key for the CosmosDB database.
    cosmosdbSqlDatabaseId string
    The ID of the CosmosDB database.
    streamAnalyticsJobId string
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    documentId 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.
    partitionKey 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_key str
    The account key for the CosmosDB database.
    cosmosdb_sql_database_id str
    The ID of the CosmosDB database.
    stream_analytics_job_id str
    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.
    containerName String
    The name of the CosmosDB container.
    cosmosdbAccountKey String
    The account key for the CosmosDB database.
    cosmosdbSqlDatabaseId String
    The ID of the CosmosDB database.
    streamAnalyticsJobId String
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    documentId 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.
    partitionKey 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.
    The following state arguments are supported:
    ContainerName string
    The name of the CosmosDB container.
    CosmosdbAccountKey string
    The account key for the CosmosDB database.
    CosmosdbSqlDatabaseId string
    The ID of the CosmosDB database.
    DocumentId 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.
    PartitionKey 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.
    StreamAnalyticsJobId string
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    ContainerName string
    The name of the CosmosDB container.
    CosmosdbAccountKey string
    The account key for the CosmosDB database.
    CosmosdbSqlDatabaseId string
    The ID of the CosmosDB database.
    DocumentId 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.
    PartitionKey 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.
    StreamAnalyticsJobId string
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    containerName String
    The name of the CosmosDB container.
    cosmosdbAccountKey String
    The account key for the CosmosDB database.
    cosmosdbSqlDatabaseId String
    The ID of the CosmosDB database.
    documentId 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.
    partitionKey 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.
    streamAnalyticsJobId String
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    containerName string
    The name of the CosmosDB container.
    cosmosdbAccountKey string
    The account key for the CosmosDB database.
    cosmosdbSqlDatabaseId string
    The ID of the CosmosDB database.
    documentId 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.
    partitionKey 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.
    streamAnalyticsJobId string
    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_key str
    The account key for the CosmosDB database.
    cosmosdb_sql_database_id str
    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_job_id str
    The ID of the Stream Analytics Job. Changing this forces a new resource to be created.
    containerName String
    The name of the CosmosDB container.
    cosmosdbAccountKey String
    The account key for the CosmosDB database.
    cosmosdbSqlDatabaseId String
    The ID of the CosmosDB database.
    documentId 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.
    partitionKey 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.
    streamAnalyticsJobId String
    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.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi