CosmosdbDataConnectionArgs

data class CosmosdbDataConnectionArgs(val cosmosdbContainerId: Output<String>? = null, val kustoDatabaseId: Output<String>? = null, val location: Output<String>? = null, val managedIdentityId: Output<String>? = null, val mappingRuleName: Output<String>? = null, val name: Output<String>? = null, val retrievalStartDate: Output<String>? = null, val tableName: Output<String>? = null) : ConvertibleToJava<CosmosdbDataConnectionArgs>

Manages a Kusto / Cosmos Database Data Connection.

Example Usage

resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
name: example
properties:
name: exampleRG
location: West Europe
exampleAssignment:
type: azure:authorization:Assignment
name: example
properties:
scope: ${exampleResourceGroup.id}
roleDefinitionName: ${builtin.name}
principalId: ${exampleCluster.identity.principalId}
exampleAccount:
type: azure:cosmosdb:Account
name: example
properties:
name: example-ca
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
offerType: Standard
kind: GlobalDocumentDB
consistencyPolicy:
consistencyLevel: Session
maxIntervalInSeconds: 5
maxStalenessPrefix: 100
geoLocations:
- location: ${exampleResourceGroup.location}
failoverPriority: 0
exampleSqlDatabase:
type: azure:cosmosdb:SqlDatabase
name: example
properties:
name: examplecosmosdbsqldb
resourceGroupName: ${exampleAccount.resourceGroupName}
accountName: ${exampleAccount.name}
exampleSqlContainer:
type: azure:cosmosdb:SqlContainer
name: example
properties:
name: examplecosmosdbsqlcon
resourceGroupName: ${exampleAccount.resourceGroupName}
accountName: ${exampleAccount.name}
databaseName: ${exampleSqlDatabase.name}
partitionKeyPath: /part
throughput: 400
exampleSqlRoleAssignment:
type: azure:cosmosdb:SqlRoleAssignment
name: example
properties:
resourceGroupName: ${exampleResourceGroup.name}
accountName: ${exampleAccount.name}
roleDefinitionId: ${example.id}
principalId: ${exampleCluster.identity.principalId}
scope: ${exampleAccount.id}
exampleCluster:
type: azure:kusto:Cluster
name: example
properties:
name: examplekc
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
sku:
name: Dev(No SLA)_Standard_D11_v2
capacity: 1
identity:
type: SystemAssigned
exampleDatabase:
type: azure:kusto:Database
name: example
properties:
name: examplekd
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
clusterName: ${exampleCluster.name}
exampleScript:
type: azure:kusto:Script
name: example
properties:
name: create-table-script
databaseId: ${exampleDatabase.id}
scriptContent: |
.create table TestTable(Id:string, Name:string, _ts:long, _timestamp:datetime)
.create table TestTable ingestion json mapping "TestMapping"
'['
' {"column":"Id","path":"$.id"},'
' {"column":"Name","path":"$.name"},'
' {"column":"_ts","path":"$._ts"},'
' {"column":"_timestamp","path":"$._ts", "transform":"DateTimeFromUnixSeconds"}'
']'
.alter table TestTable policy ingestionbatching "{'MaximumBatchingTimeSpan': '0:0:10', 'MaximumNumberOfItems': 10000}"
exampleCosmosdbDataConnection:
type: azure:kusto:CosmosdbDataConnection
name: example
properties:
name: examplekcdcd
location: ${exampleResourceGroup.location}
cosmosdbContainerId: ${exampleSqlContainer.id}
kustoDatabaseId: ${exampleDatabase.id}
managedIdentityId: ${exampleCluster.id}
tableName: TestTable
mappingRuleName: TestMapping
retrievalStartDate: 2023-06-26T12:00:00.6554616Z
variables:
current:
fn::invoke:
function: azure:core:getClientConfig
arguments: {}
builtin:
fn::invoke:
function: azure:authorization:getRoleDefinition
arguments:
roleDefinitionId: fbdf93bf-df7d-467e-a4d2-9458aa1360c8
example:
fn::invoke:
function: azure:cosmosdb:getSqlRoleDefinition
arguments:
roleDefinitionId: 00000000-0000-0000-0000-000000000001
resourceGroupName: ${exampleResourceGroup.name}
accountName: ${exampleAccount.name}

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.Kusto: 2024-04-13

Import

Kusto / Cosmos Database Data Connection can be imported using the resource id, e.g.

$ pulumi import azure:kusto/cosmosdbDataConnection:CosmosdbDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/dataConnection1

Constructors

Link copied to clipboard
constructor(cosmosdbContainerId: Output<String>? = null, kustoDatabaseId: Output<String>? = null, location: Output<String>? = null, managedIdentityId: Output<String>? = null, mappingRuleName: Output<String>? = null, name: Output<String>? = null, retrievalStartDate: Output<String>? = null, tableName: Output<String>? = null)

Properties

Link copied to clipboard
val cosmosdbContainerId: Output<String>? = null

The name of an existing container in the Cosmos DB database. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val kustoDatabaseId: Output<String>? = null

The name of the database in the Kusto cluster. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val location: Output<String>? = null

The Azure Region where the Data Explorer should exist. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val managedIdentityId: Output<String>? = null

The resource ID of a managed system or user-assigned identity. The identity is used to authenticate with Cosmos DB. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val mappingRuleName: Output<String>? = null

The name of an existing mapping rule to use when ingesting the retrieved data. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val name: Output<String>? = null

The name of the data connection. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val retrievalStartDate: Output<String>? = null

If defined, the data connection retrieves Cosmos DB documents created or updated after the specified retrieval start date. Changing this forces a new Kusto Cosmos DB Connection to be created.

Link copied to clipboard
val tableName: Output<String>? = null

The case-sensitive name of the existing target table in your cluster. Retrieved data is ingested into this table. Changing this forces a new Kusto Cosmos DB Connection to be created.

Functions

Link copied to clipboard
open override fun toJava(): CosmosdbDataConnectionArgs