你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Databases - Update

Updates a database.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}?api-version=2023-08-15
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}?api-version=2023-08-15&callerRole={callerRole}

URI Parameters

Name In Required Type Description
clusterName
path True

string

The name of the Kusto cluster.

Regex pattern: ^.*$

databaseName
path True

string

The name of the database in the Kusto cluster.

Regex pattern: ^.*$

resourceGroupName
path True

string

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

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

callerRole
query

callerRole

By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list.

Request Body

The request body can be one of the following:

Name Description
ReadOnlyFollowingDatabase

Class representing a read only following database.

ReadWriteDatabase

Class representing a read write database.

ReadOnlyFollowingDatabase

Class representing a read only following database.

Name Required Type Description
kind True string:

ReadOnlyFollowing

Kind of the database

location

string

Resource location.

properties.hotCachePeriod

string

The time the data should be kept in cache for fast queries in TimeSpan.

ReadWriteDatabase

Class representing a read write database.

Name Required Type Description
kind True string:

ReadWrite

Kind of the database

location

string

Resource location.

properties.hotCachePeriod

string

The time the data should be kept in cache for fast queries in TimeSpan.

properties.keyVaultProperties

KeyVaultProperties

KeyVault properties for the database encryption.

properties.softDeletePeriod

string

The time the data should be kept before it stops being accessible to queries in TimeSpan.

Responses

Name Type Description
200 OK Database:

Successfully updated the database.

201 Created Database:

Successfully updated the database.

Headers

  • Location: string
  • Azure-AsyncOperation: string
202 Accepted Database:

Accepted the update database request.

Headers

  • Location: string
  • Azure-AsyncOperation: string
Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

KustoDatabasesUpdate

Sample request

PATCH https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/clusters/kustoCluster/databases/KustoDatabase8?api-version=2023-08-15

{
  "kind": "ReadWrite",
  "properties": {
    "hotCachePeriod": "P1D"
  }
}

Sample response

{
  "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8",
  "name": "kustoCluster/KustoDatabase8",
  "type": "Microsoft.Kusto/Clusters/Databases",
  "kind": "ReadWrite",
  "location": "westus",
  "properties": {
    "hotCachePeriod": "P1D",
    "provisioningState": "Succeeded"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789098/providers/Microsoft.Kusto/locations/westus/operationResults/742bef43-608b-4b58-ba96-6f7a32ec5f0f?api-version=2021-02-01
{
  "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8",
  "name": "kustoCluster/KustoDatabase8",
  "type": "Microsoft.Kusto/Clusters/Databases",
  "kind": "ReadWrite",
  "location": "westus",
  "properties": {
    "hotCachePeriod": "P1D",
    "provisioningState": "Succeeded"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789098/providers/Microsoft.Kusto/locations/westus/operationResults/742bef43-608b-4b58-ba96-6f7a32ec5f0f?api-version=2021-02-01
{
  "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/kustoCluster/Databases/KustoDatabase8",
  "name": "kustoCluster/KustoDatabase8",
  "type": "Microsoft.Kusto/Clusters/Databases",
  "location": "westus",
  "kind": "ReadWrite",
  "properties": {
    "hotCachePeriod": "P1D",
    "provisioningState": "Succeeded"
  }
}

Definitions

Name Description
callerRole

By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list.

DatabaseShareOrigin

The origin of the following setup.

DatabaseStatistics

A class that contains database statistics information.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

KeyVaultProperties

Properties of the key vault.

PrincipalsModificationKind

The principals modification kind of the database

ProvisioningState

The provisioned state of the resource.

ReadOnlyFollowingDatabase

Class representing a read only following database.

ReadWriteDatabase

Class representing a read write database.

SuspensionDetails

The database suspension details. If the database is suspended, this object contains information related to the database's suspension state.

TableLevelSharingProperties

Tables that will be included and excluded in the follower database

callerRole

By default, any user who run operation on a database become an Admin on it. This property allows the caller to exclude the caller from Admins list.

Name Type Description
Admin

string

None

string

DatabaseShareOrigin

The origin of the following setup.

Name Type Description
DataShare

string

Direct

string

Other

string

DatabaseStatistics

A class that contains database statistics information.

Name Type Description
size

number

The database size - the total size of compressed data and index in bytes.

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.

KeyVaultProperties

Properties of the key vault.

Name Type Description
keyName

string

The name of the key vault key.

keyVaultUri

string

The Uri of the key vault.

keyVersion

string

The version of the key vault key.

userIdentity

string

The user assigned identity (ARM resource id) that has access to the key.

PrincipalsModificationKind

The principals modification kind of the database

Name Type Description
None

string

Replace

string

Union

string

ProvisioningState

The provisioned state of the resource.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Moving

string

Running

string

Succeeded

string

ReadOnlyFollowingDatabase

Class representing a read only following database.

Name Type Description
id

string

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

kind string:

ReadOnlyFollowing

Kind of the database

location

string

Resource location.

name

string

The name of the resource

properties.attachedDatabaseConfigurationName

string

The name of the attached database configuration cluster

properties.databaseShareOrigin

DatabaseShareOrigin

The origin of the following setup.

properties.hotCachePeriod

string

The time the data should be kept in cache for fast queries in TimeSpan.

properties.leaderClusterResourceId

string

The name of the leader cluster

properties.originalDatabaseName

string

The original database name, before databaseNameOverride or databaseNamePrefix where applied.

properties.principalsModificationKind

PrincipalsModificationKind

The principals modification kind of the database

properties.provisioningState

ProvisioningState

The provisioned state of the resource.

properties.softDeletePeriod

string

The time the data should be kept before it stops being accessible to queries in TimeSpan.

properties.statistics

DatabaseStatistics

The statistics of the database.

properties.suspensionDetails

SuspensionDetails

The database suspension details. If the database is suspended, this object contains information related to the database's suspension state.

properties.tableLevelSharingProperties

TableLevelSharingProperties

Table level sharing specifications

type

string

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

ReadWriteDatabase

Class representing a read write database.

Name Type Description
id

string

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

kind string:

ReadWrite

Kind of the database

location

string

Resource location.

name

string

The name of the resource

properties.hotCachePeriod

string

The time the data should be kept in cache for fast queries in TimeSpan.

properties.isFollowed

boolean

Indicates whether the database is followed.

properties.keyVaultProperties

KeyVaultProperties

KeyVault properties for the database encryption.

properties.provisioningState

ProvisioningState

The provisioned state of the resource.

properties.softDeletePeriod

string

The time the data should be kept before it stops being accessible to queries in TimeSpan.

properties.statistics

DatabaseStatistics

The statistics of the database.

properties.suspensionDetails

SuspensionDetails

The database suspension details. If the database is suspended, this object contains information related to the database's suspension state.

type

string

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

SuspensionDetails

The database suspension details. If the database is suspended, this object contains information related to the database's suspension state.

Name Type Description
suspensionStartDate

string

The starting date and time of the suspension state.

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