1. Packages
  2. Azure Classic
  3. API Docs
  4. iot
  5. EndpointCosmosdbAccount

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.iot.EndpointCosmosdbAccount

Explore with Pulumi AI

Manages an IotHub Cosmos DB Account Endpoint

NOTE: Endpoints can be defined either directly on the azure.iot.IoTHub resource, or using the azurerm_iothub_endpoint_* resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a azurerm_iothub_endpoint_* resource and another endpoint of a different type directly on the azure.iot.IoTHub resource is not supported.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleIoTHub:
    type: azure:iot:IoTHub
    name: example
    properties:
      name: exampleIothub
      resourceGroupName: ${example.name}
      location: ${example.location}
      sku:
        name: B1
        capacity: '1'
      tags:
        purpose: example
  exampleAccount:
    type: azure:cosmosdb:Account
    name: example
    properties:
      name: cosmosdb-account
      location: ${example.location}
      resourceGroupName: ${example.name}
      offerType: Standard
      kind: GlobalDocumentDB
      consistencyPolicy:
        consistencyLevel: Strong
      geoLocations:
        - location: ${example.location}
          failoverPriority: 0
  exampleSqlDatabase:
    type: azure:cosmosdb:SqlDatabase
    name: example
    properties:
      name: cosmos-sql-db
      resourceGroupName: ${exampleAccount.resourceGroupName}
      accountName: ${exampleAccount.name}
  exampleSqlContainer:
    type: azure:cosmosdb:SqlContainer
    name: example
    properties:
      name: example-container
      resourceGroupName: ${exampleAccount.resourceGroupName}
      accountName: ${exampleAccount.name}
      databaseName: ${exampleSqlDatabase.name}
      partitionKeyPath: /definition/id
  exampleEndpointCosmosdbAccount:
    type: azure:iot:EndpointCosmosdbAccount
    name: example
    properties:
      name: example
      resourceGroupName: ${example.name}
      iothubId: ${exampleIoTHub.id}
      containerName: ${exampleSqlContainer.name}
      databaseName: ${exampleSqlDatabase.name}
      endpointUri: ${exampleAccount.endpoint}
      primaryKey: ${exampleAccount.primaryKey}
      secondaryKey: ${exampleAccount.secondaryKey}
Copy

Create EndpointCosmosdbAccount Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new EndpointCosmosdbAccount(name: string, args: EndpointCosmosdbAccountArgs, opts?: CustomResourceOptions);
@overload
def EndpointCosmosdbAccount(resource_name: str,
                            args: EndpointCosmosdbAccountArgs,
                            opts: Optional[ResourceOptions] = None)

@overload
def EndpointCosmosdbAccount(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            container_name: Optional[str] = None,
                            database_name: Optional[str] = None,
                            endpoint_uri: Optional[str] = None,
                            iothub_id: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            authentication_type: Optional[str] = None,
                            identity_id: Optional[str] = None,
                            name: Optional[str] = None,
                            partition_key_name: Optional[str] = None,
                            partition_key_template: Optional[str] = None,
                            primary_key: Optional[str] = None,
                            secondary_key: Optional[str] = None)
func NewEndpointCosmosdbAccount(ctx *Context, name string, args EndpointCosmosdbAccountArgs, opts ...ResourceOption) (*EndpointCosmosdbAccount, error)
public EndpointCosmosdbAccount(string name, EndpointCosmosdbAccountArgs args, CustomResourceOptions? opts = null)
public EndpointCosmosdbAccount(String name, EndpointCosmosdbAccountArgs args)
public EndpointCosmosdbAccount(String name, EndpointCosmosdbAccountArgs args, CustomResourceOptions options)
type: azure:iot:EndpointCosmosdbAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. EndpointCosmosdbAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. EndpointCosmosdbAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. EndpointCosmosdbAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. EndpointCosmosdbAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EndpointCosmosdbAccountArgs
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 endpointCosmosdbAccountResource = new Azure.Iot.EndpointCosmosdbAccount("endpointCosmosdbAccountResource", new()
{
    ContainerName = "string",
    DatabaseName = "string",
    EndpointUri = "string",
    IothubId = "string",
    ResourceGroupName = "string",
    AuthenticationType = "string",
    IdentityId = "string",
    Name = "string",
    PartitionKeyName = "string",
    PartitionKeyTemplate = "string",
    PrimaryKey = "string",
    SecondaryKey = "string",
});
Copy
example, err := iot.NewEndpointCosmosdbAccount(ctx, "endpointCosmosdbAccountResource", &iot.EndpointCosmosdbAccountArgs{
	ContainerName:        pulumi.String("string"),
	DatabaseName:         pulumi.String("string"),
	EndpointUri:          pulumi.String("string"),
	IothubId:             pulumi.String("string"),
	ResourceGroupName:    pulumi.String("string"),
	AuthenticationType:   pulumi.String("string"),
	IdentityId:           pulumi.String("string"),
	Name:                 pulumi.String("string"),
	PartitionKeyName:     pulumi.String("string"),
	PartitionKeyTemplate: pulumi.String("string"),
	PrimaryKey:           pulumi.String("string"),
	SecondaryKey:         pulumi.String("string"),
})
Copy
var endpointCosmosdbAccountResource = new EndpointCosmosdbAccount("endpointCosmosdbAccountResource", EndpointCosmosdbAccountArgs.builder()
    .containerName("string")
    .databaseName("string")
    .endpointUri("string")
    .iothubId("string")
    .resourceGroupName("string")
    .authenticationType("string")
    .identityId("string")
    .name("string")
    .partitionKeyName("string")
    .partitionKeyTemplate("string")
    .primaryKey("string")
    .secondaryKey("string")
    .build());
Copy
endpoint_cosmosdb_account_resource = azure.iot.EndpointCosmosdbAccount("endpointCosmosdbAccountResource",
    container_name="string",
    database_name="string",
    endpoint_uri="string",
    iothub_id="string",
    resource_group_name="string",
    authentication_type="string",
    identity_id="string",
    name="string",
    partition_key_name="string",
    partition_key_template="string",
    primary_key="string",
    secondary_key="string")
Copy
const endpointCosmosdbAccountResource = new azure.iot.EndpointCosmosdbAccount("endpointCosmosdbAccountResource", {
    containerName: "string",
    databaseName: "string",
    endpointUri: "string",
    iothubId: "string",
    resourceGroupName: "string",
    authenticationType: "string",
    identityId: "string",
    name: "string",
    partitionKeyName: "string",
    partitionKeyTemplate: "string",
    primaryKey: "string",
    secondaryKey: "string",
});
Copy
type: azure:iot:EndpointCosmosdbAccount
properties:
    authenticationType: string
    containerName: string
    databaseName: string
    endpointUri: string
    identityId: string
    iothubId: string
    name: string
    partitionKeyName: string
    partitionKeyTemplate: string
    primaryKey: string
    resourceGroupName: string
    secondaryKey: string
Copy

EndpointCosmosdbAccount 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 EndpointCosmosdbAccount resource accepts the following input properties:

ContainerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
EndpointUri
This property is required.
Changes to this property will trigger replacement.
string
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
IothubId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
AuthenticationType string
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
IdentityId string

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

Name Changes to this property will trigger replacement. string
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
PartitionKeyName string
The name of the partition key associated with the Cosmos DB Container.
PartitionKeyTemplate string
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
PrimaryKey string

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

SecondaryKey string

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

ContainerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
DatabaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
EndpointUri
This property is required.
Changes to this property will trigger replacement.
string
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
IothubId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
AuthenticationType string
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
IdentityId string

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

Name Changes to this property will trigger replacement. string
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
PartitionKeyName string
The name of the partition key associated with the Cosmos DB Container.
PartitionKeyTemplate string
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
PrimaryKey string

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

SecondaryKey string

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

containerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpointUri
This property is required.
Changes to this property will trigger replacement.
String
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
iothubId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
authenticationType String
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
identityId String

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

name Changes to this property will trigger replacement. String
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partitionKeyName String
The name of the partition key associated with the Cosmos DB Container.
partitionKeyTemplate String
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primaryKey String

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

secondaryKey String

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

containerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
databaseName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpointUri
This property is required.
Changes to this property will trigger replacement.
string
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
iothubId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
authenticationType string
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
identityId string

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

name Changes to this property will trigger replacement. string
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partitionKeyName string
The name of the partition key associated with the Cosmos DB Container.
partitionKeyTemplate string
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primaryKey string

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

secondaryKey string

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

container_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
database_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpoint_uri
This property is required.
Changes to this property will trigger replacement.
str
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
iothub_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
authentication_type str
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
identity_id str

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

name Changes to this property will trigger replacement. str
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partition_key_name str
The name of the partition key associated with the Cosmos DB Container.
partition_key_template str
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primary_key str

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

secondary_key str

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

containerName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
databaseName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpointUri
This property is required.
Changes to this property will trigger replacement.
String
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
iothubId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
authenticationType String
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
identityId String

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

name Changes to this property will trigger replacement. String
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partitionKeyName String
The name of the partition key associated with the Cosmos DB Container.
partitionKeyTemplate String
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primaryKey String

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

secondaryKey String

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

Outputs

All input properties are implicitly available as output properties. Additionally, the EndpointCosmosdbAccount 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 EndpointCosmosdbAccount Resource

Get an existing EndpointCosmosdbAccount 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?: EndpointCosmosdbAccountState, opts?: CustomResourceOptions): EndpointCosmosdbAccount
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authentication_type: Optional[str] = None,
        container_name: Optional[str] = None,
        database_name: Optional[str] = None,
        endpoint_uri: Optional[str] = None,
        identity_id: Optional[str] = None,
        iothub_id: Optional[str] = None,
        name: Optional[str] = None,
        partition_key_name: Optional[str] = None,
        partition_key_template: Optional[str] = None,
        primary_key: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        secondary_key: Optional[str] = None) -> EndpointCosmosdbAccount
func GetEndpointCosmosdbAccount(ctx *Context, name string, id IDInput, state *EndpointCosmosdbAccountState, opts ...ResourceOption) (*EndpointCosmosdbAccount, error)
public static EndpointCosmosdbAccount Get(string name, Input<string> id, EndpointCosmosdbAccountState? state, CustomResourceOptions? opts = null)
public static EndpointCosmosdbAccount get(String name, Output<String> id, EndpointCosmosdbAccountState state, CustomResourceOptions options)
resources:  _:    type: azure:iot:EndpointCosmosdbAccount    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AuthenticationType string
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
ContainerName Changes to this property will trigger replacement. string
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
DatabaseName Changes to this property will trigger replacement. string
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
EndpointUri Changes to this property will trigger replacement. string
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
IdentityId string

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

IothubId Changes to this property will trigger replacement. string
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
PartitionKeyName string
The name of the partition key associated with the Cosmos DB Container.
PartitionKeyTemplate string
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
PrimaryKey string

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
SecondaryKey string

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

AuthenticationType string
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
ContainerName Changes to this property will trigger replacement. string
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
DatabaseName Changes to this property will trigger replacement. string
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
EndpointUri Changes to this property will trigger replacement. string
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
IdentityId string

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

IothubId Changes to this property will trigger replacement. string
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
PartitionKeyName string
The name of the partition key associated with the Cosmos DB Container.
PartitionKeyTemplate string
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
PrimaryKey string

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
SecondaryKey string

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

authenticationType String
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
containerName Changes to this property will trigger replacement. String
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
databaseName Changes to this property will trigger replacement. String
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpointUri Changes to this property will trigger replacement. String
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
identityId String

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

iothubId Changes to this property will trigger replacement. String
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partitionKeyName String
The name of the partition key associated with the Cosmos DB Container.
partitionKeyTemplate String
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primaryKey String

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
secondaryKey String

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

authenticationType string
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
containerName Changes to this property will trigger replacement. string
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
databaseName Changes to this property will trigger replacement. string
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpointUri Changes to this property will trigger replacement. string
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
identityId string

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

iothubId Changes to this property will trigger replacement. string
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partitionKeyName string
The name of the partition key associated with the Cosmos DB Container.
partitionKeyTemplate string
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primaryKey string

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
secondaryKey string

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

authentication_type str
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
container_name Changes to this property will trigger replacement. str
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
database_name Changes to this property will trigger replacement. str
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpoint_uri Changes to this property will trigger replacement. str
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
identity_id str

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

iothub_id Changes to this property will trigger replacement. str
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partition_key_name str
The name of the partition key associated with the Cosmos DB Container.
partition_key_template str
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primary_key str

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

resource_group_name Changes to this property will trigger replacement. str
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
secondary_key str

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

authenticationType String
The type used to authenticate against the Cosmos DB Account endpoint. Possible values are keyBased and identityBased. Defaults to keyBased.
containerName Changes to this property will trigger replacement. String
The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created.
databaseName Changes to this property will trigger replacement. String
The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created.
endpointUri Changes to this property will trigger replacement. String
The URI of the Cosmos DB Account. Changing this forces a new resource to be created.
identityId String

The ID of the User Managed Identity used to authenticate against the Cosmos DB Account endpoint.

NOTE: identity_id can only be specified when authentication_type is identityBased. It must be one of the identity_ids of the Iot Hub. If not specified when authentication_type is identityBased, System Assigned Managed Identity of the Iot Hub will be used.

iothubId Changes to this property will trigger replacement. String
The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: events, operationsMonitoringEvents, fileNotifications and $default. Changing this forces a new resource to be created.
partitionKeyName String
The name of the partition key associated with the Cosmos DB Container.
partitionKeyTemplate String
The template for generating a synthetic partition key value for use within the Cosmos DB Container.
primaryKey String

The primary key of the Cosmos DB Account.

NOTE: primary_key must and can only be specified when authentication_type is keyBased.

resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created.
secondaryKey String

The secondary key of the Cosmos DB Account.

NOTE: secondary_key must and can only be specified when authentication_type is keyBased.

Import

IoTHub Cosmos DB Account Endpoint can be imported using the resource id, e.g.

$ pulumi import azure:iot/endpointCosmosdbAccount:EndpointCosmosdbAccount endpoint1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/cosmosDBAccountEndpoint1
Copy

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.