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

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.streamanalytics.OutputCosmosdb

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Stream Analytics Output to CosmosDB.

    Example Usage

    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",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("example",
        name="rg-example",
        location="West Europe")
    example = azure.streamanalytics.get_job_output(name="example-job",
        resource_group_name=example_resource_group.name)
    example_account = azure.cosmosdb.Account("example",
        name="exampledb",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        offer_type="Standard",
        kind="GlobalDocumentDB",
        consistency_policy=azure.cosmosdb.AccountConsistencyPolicyArgs(
            consistency_level="BoundedStaleness",
            max_interval_in_seconds=10,
            max_staleness_prefix=200,
        ),
        geo_locations=[azure.cosmosdb.AccountGeoLocationArgs(
            location=example_resource_group.location,
            failover_priority=0,
        )])
    example_sql_database = azure.cosmosdb.SqlDatabase("example",
        name="cosmos-sql-db",
        resource_group_name=example_account.resource_group_name,
        account_name=example_account.name,
        throughput=400)
    example_sql_container = azure.cosmosdb.SqlContainer("example",
        name="examplecontainer",
        resource_group_name=example_account.resource_group_name,
        account_name=example_account.name,
        database_name=example_sql_database.name,
        partition_key_path="foo")
    example_output_cosmosdb = azure.streamanalytics.OutputCosmosdb("example",
        name="output-to-cosmosdb",
        stream_analytics_job_id=example.id,
        cosmosdb_account_key=example_account.primary_key,
        cosmosdb_sql_database_id=example_sql_database.id,
        container_name=example_sql_container.name,
        document_id="exampledocumentid")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cosmosdb"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/streamanalytics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("rg-example"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{
    			Name:              pulumi.String("example-job"),
    			ResourceGroupName: exampleResourceGroup.Name,
    		}, nil)
    		exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{
    			Name:              pulumi.String("exampledb"),
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			OfferType:         pulumi.String("Standard"),
    			Kind:              pulumi.String("GlobalDocumentDB"),
    			ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{
    				ConsistencyLevel:     pulumi.String("BoundedStaleness"),
    				MaxIntervalInSeconds: pulumi.Int(10),
    				MaxStalenessPrefix:   pulumi.Int(200),
    			},
    			GeoLocations: cosmosdb.AccountGeoLocationArray{
    				&cosmosdb.AccountGeoLocationArgs{
    					Location:         exampleResourceGroup.Location,
    					FailoverPriority: pulumi.Int(0),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{
    			Name:              pulumi.String("cosmos-sql-db"),
    			ResourceGroupName: exampleAccount.ResourceGroupName,
    			AccountName:       exampleAccount.Name,
    			Throughput:        pulumi.Int(400),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSqlContainer, err := cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{
    			Name:              pulumi.String("examplecontainer"),
    			ResourceGroupName: exampleAccount.ResourceGroupName,
    			AccountName:       exampleAccount.Name,
    			DatabaseName:      exampleSqlDatabase.Name,
    			PartitionKeyPath:  pulumi.String("foo"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = streamanalytics.NewOutputCosmosdb(ctx, "example", &streamanalytics.OutputCosmosdbArgs{
    			Name: pulumi.String("output-to-cosmosdb"),
    			StreamAnalyticsJobId: example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) {
    				return &example.Id, nil
    			}).(pulumi.StringPtrOutput),
    			CosmosdbAccountKey:    exampleAccount.PrimaryKey,
    			CosmosdbSqlDatabaseId: exampleSqlDatabase.ID(),
    			ContainerName:         exampleSqlContainer.Name,
    			DocumentId:            pulumi.String("exampledocumentid"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "rg-example",
            Location = "West Europe",
        });
    
        var example = Azure.StreamAnalytics.GetJob.Invoke(new()
        {
            Name = "example-job",
            ResourceGroupName = exampleResourceGroup.Name,
        });
    
        var exampleAccount = new Azure.CosmosDB.Account("example", new()
        {
            Name = "exampledb",
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            OfferType = "Standard",
            Kind = "GlobalDocumentDB",
            ConsistencyPolicy = new Azure.CosmosDB.Inputs.AccountConsistencyPolicyArgs
            {
                ConsistencyLevel = "BoundedStaleness",
                MaxIntervalInSeconds = 10,
                MaxStalenessPrefix = 200,
            },
            GeoLocations = new[]
            {
                new Azure.CosmosDB.Inputs.AccountGeoLocationArgs
                {
                    Location = exampleResourceGroup.Location,
                    FailoverPriority = 0,
                },
            },
        });
    
        var exampleSqlDatabase = new Azure.CosmosDB.SqlDatabase("example", new()
        {
            Name = "cosmos-sql-db",
            ResourceGroupName = exampleAccount.ResourceGroupName,
            AccountName = exampleAccount.Name,
            Throughput = 400,
        });
    
        var exampleSqlContainer = new Azure.CosmosDB.SqlContainer("example", new()
        {
            Name = "examplecontainer",
            ResourceGroupName = exampleAccount.ResourceGroupName,
            AccountName = exampleAccount.Name,
            DatabaseName = exampleSqlDatabase.Name,
            PartitionKeyPath = "foo",
        });
    
        var exampleOutputCosmosdb = new Azure.StreamAnalytics.OutputCosmosdb("example", new()
        {
            Name = "output-to-cosmosdb",
            StreamAnalyticsJobId = example.Apply(getJobResult => getJobResult.Id),
            CosmosdbAccountKey = exampleAccount.PrimaryKey,
            CosmosdbSqlDatabaseId = exampleSqlDatabase.Id,
            ContainerName = exampleSqlContainer.Name,
            DocumentId = "exampledocumentid",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.streamanalytics.StreamanalyticsFunctions;
    import com.pulumi.azure.streamanalytics.inputs.GetJobArgs;
    import com.pulumi.azure.cosmosdb.Account;
    import com.pulumi.azure.cosmosdb.AccountArgs;
    import com.pulumi.azure.cosmosdb.inputs.AccountConsistencyPolicyArgs;
    import com.pulumi.azure.cosmosdb.inputs.AccountGeoLocationArgs;
    import com.pulumi.azure.cosmosdb.SqlDatabase;
    import com.pulumi.azure.cosmosdb.SqlDatabaseArgs;
    import com.pulumi.azure.cosmosdb.SqlContainer;
    import com.pulumi.azure.cosmosdb.SqlContainerArgs;
    import com.pulumi.azure.streamanalytics.OutputCosmosdb;
    import com.pulumi.azure.streamanalytics.OutputCosmosdbArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
                .name("rg-example")
                .location("West Europe")
                .build());
    
            final var example = StreamanalyticsFunctions.getJob(GetJobArgs.builder()
                .name("example-job")
                .resourceGroupName(exampleResourceGroup.name())
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("exampledb")
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .offerType("Standard")
                .kind("GlobalDocumentDB")
                .consistencyPolicy(AccountConsistencyPolicyArgs.builder()
                    .consistencyLevel("BoundedStaleness")
                    .maxIntervalInSeconds(10)
                    .maxStalenessPrefix(200)
                    .build())
                .geoLocations(AccountGeoLocationArgs.builder()
                    .location(exampleResourceGroup.location())
                    .failoverPriority(0)
                    .build())
                .build());
    
            var exampleSqlDatabase = new SqlDatabase("exampleSqlDatabase", SqlDatabaseArgs.builder()
                .name("cosmos-sql-db")
                .resourceGroupName(exampleAccount.resourceGroupName())
                .accountName(exampleAccount.name())
                .throughput(400)
                .build());
    
            var exampleSqlContainer = new SqlContainer("exampleSqlContainer", SqlContainerArgs.builder()
                .name("examplecontainer")
                .resourceGroupName(exampleAccount.resourceGroupName())
                .accountName(exampleAccount.name())
                .databaseName(exampleSqlDatabase.name())
                .partitionKeyPath("foo")
                .build());
    
            var exampleOutputCosmosdb = new OutputCosmosdb("exampleOutputCosmosdb", OutputCosmosdbArgs.builder()
                .name("output-to-cosmosdb")
                .streamAnalyticsJobId(example.applyValue(getJobResult -> getJobResult).applyValue(example -> example.applyValue(getJobResult -> getJobResult.id())))
                .cosmosdbAccountKey(exampleAccount.primaryKey())
                .cosmosdbSqlDatabaseId(exampleSqlDatabase.id())
                .containerName(exampleSqlContainer.name())
                .documentId("exampledocumentid")
                .build());
    
        }
    }
    
    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

    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 Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi