Share via


Attached Database Configurations - Create Or Update

Creates or updates an attached database configuration.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}?api-version=2024-04-13

URI Parameters

Name In Required Type Description
attachedDatabaseConfigurationName
path True

string

pattern: ^.*$

The name of the attached database configuration.

clusterName
path True

string

pattern: ^.*$

The name of the Kusto cluster.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
properties.clusterResourceId True

string

The resource id of the cluster where the databases you would like to attach reside.

properties.databaseName True

string

The name of the database which you would like to attach, use * if you want to follow all current and future databases.

properties.defaultPrincipalsModificationKind True

DefaultPrincipalsModificationKind

The default principals modification kind

location

string

Resource location.

properties.databaseNameOverride

string

Overrides the original database name. Relevant only when attaching to a specific database.

properties.databaseNamePrefix

string

Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the databases original names from leader cluster.

properties.tableLevelSharingProperties

TableLevelSharingProperties

Table level sharing specifications

Responses

Name Type Description
200 OK

AttachedDatabaseConfiguration

Successfully updated the database.

201 Created

AttachedDatabaseConfiguration

Successfully created the database.

202 Accepted

AttachedDatabaseConfiguration

Accepted the create database request.

Headers

Azure-AsyncOperation: string

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

AttachedDatabaseConfigurationsCreateOrUpdate

Sample request

PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/clusters/kustoCluster2/attachedDatabaseConfigurations/attachedDatabaseConfigurationsTest?api-version=2024-04-13

{
  "location": "westus",
  "properties": {
    "clusterResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2",
    "databaseName": "kustodatabase",
    "defaultPrincipalsModificationKind": "Union",
    "databaseNameOverride": "overridekustodatabase",
    "tableLevelSharingProperties": {
      "tablesToInclude": [
        "Table1"
      ],
      "tablesToExclude": [
        "Table2"
      ],
      "externalTablesToInclude": [
        "ExternalTable1"
      ],
      "externalTablesToExclude": [
        "ExternalTable2"
      ],
      "materializedViewsToInclude": [
        "MaterializedViewTable1"
      ],
      "materializedViewsToExclude": [
        "MaterializedViewTable2"
      ]
    }
  }
}

Sample response

{
  "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/attachedDatabaseConfigurations/attachedDatabaseConfigurationsTest",
  "name": "kustoCluster2/attachedDatabaseConfigurationsTest",
  "type": "Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations",
  "location": "westus",
  "properties": {
    "clusterResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2",
    "databaseName": "db1",
    "defaultPrincipalsModificationKind": "Union",
    "databaseNameOverride": "overridekustodatabase",
    "tableLevelSharingProperties": {
      "tablesToInclude": [
        "Table1"
      ],
      "tablesToExclude": [
        "Table2"
      ],
      "externalTablesToInclude": [
        "ExternalTable1"
      ],
      "externalTablesToExclude": [
        "ExternalTable2"
      ],
      "materializedViewsToInclude": [
        "MaterializedViewTable1"
      ],
      "materializedViewsToExclude": [
        "MaterializedViewTable2"
      ]
    },
    "provisioningState": "Succeeded"
  }
}
{
  "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/attachedDatabaseConfigurations/attachedDatabaseConfigurationsTest",
  "name": "kustoCluster2/attachedDatabaseConfigurationsTest",
  "type": "Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations",
  "location": "westus",
  "properties": {
    "clusterResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2",
    "databaseName": "db1",
    "defaultPrincipalsModificationKind": "Union",
    "databaseNameOverride": "overridekustodatabase",
    "tableLevelSharingProperties": {
      "tablesToInclude": [
        "Table1"
      ],
      "tablesToExclude": [
        "Table2"
      ],
      "externalTablesToInclude": [
        "ExternalTable1"
      ],
      "externalTablesToExclude": [
        "ExternalTable2"
      ],
      "materializedViewsToInclude": [
        "MaterializedViewTable1"
      ],
      "materializedViewsToExclude": [
        "MaterializedViewTable2"
      ]
    },
    "provisioningState": "Creating"
  }
}
{
  "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2/attachedDatabaseConfigurations/attachedDatabaseConfigurationsTest",
  "name": "kustoCluster2/attachedDatabaseConfigurationsTest",
  "type": "Microsoft.Kusto/Clusters/AttachedDatabaseConfigurations",
  "location": "westus",
  "properties": {
    "clusterResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster2",
    "databaseName": "db1",
    "defaultPrincipalsModificationKind": "Union",
    "databaseNameOverride": "overridekustodatabase",
    "tableLevelSharingProperties": {
      "tablesToInclude": [
        "Table1"
      ],
      "tablesToExclude": [
        "Table2"
      ],
      "externalTablesToInclude": [
        "ExternalTable1"
      ],
      "externalTablesToExclude": [
        "ExternalTable2"
      ],
      "materializedViewsToInclude": [
        "MaterializedViewTable1"
      ],
      "materializedViewsToExclude": [
        "MaterializedViewTable2"
      ]
    },
    "provisioningState": "Creating"
  }
}

Definitions

Name Description
AttachedDatabaseConfiguration

Class representing an attached database configuration.

DefaultPrincipalsModificationKind

The default principals modification kind

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ProvisioningState

The provisioned state of the resource.

TableLevelSharingProperties

Tables that will be included and excluded in the follower database

AttachedDatabaseConfiguration

Class representing an attached database configuration.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

Resource location.

name

string

The name of the resource

properties.attachedDatabaseNames

string[]

The list of databases from the clusterResourceId which are currently attached to the cluster.

properties.clusterResourceId

string

The resource id of the cluster where the databases you would like to attach reside.

properties.databaseName

string

The name of the database which you would like to attach, use * if you want to follow all current and future databases.

properties.databaseNameOverride

string

Overrides the original database name. Relevant only when attaching to a specific database.

properties.databaseNamePrefix

string

Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to all of the databases original names from leader cluster.

properties.defaultPrincipalsModificationKind

DefaultPrincipalsModificationKind

The default principals modification kind

properties.provisioningState

ProvisioningState

The provisioned state of the resource.

properties.tableLevelSharingProperties

TableLevelSharingProperties

Table level sharing specifications

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DefaultPrincipalsModificationKind

The default principals modification kind

Value Description
Union
Replace
None

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ProvisioningState

The provisioned state of the resource.

Value Description
Running
Creating
Deleting
Succeeded
Failed
Moving
Canceled

TableLevelSharingProperties

Tables that will be included and excluded in the follower database

Name Type Description
externalTablesToExclude

string[]

List of external tables to exclude from the follower database

externalTablesToInclude

string[]

List of external tables to include in the follower database

functionsToExclude

string[]

List of functions to exclude from the follower database

functionsToInclude

string[]

List of functions to include in the follower database

materializedViewsToExclude

string[]

List of materialized views to exclude from the follower database

materializedViewsToInclude

string[]

List of materialized views to include in the follower database

tablesToExclude

string[]

List of tables to exclude from the follower database

tablesToInclude

string[]

List of tables to include in the follower database