DatabaseAccounts interface
Interface representing a DatabaseAccounts.
Methods
begin |
Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. |
begin |
Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account. |
begin |
Deletes an existing Azure Cosmos DB database account. |
begin |
Deletes an existing Azure Cosmos DB database account. |
begin |
Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. |
begin |
Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. |
begin |
Offline the specified region for the specified Azure Cosmos DB database account. |
begin |
Offline the specified region for the specified Azure Cosmos DB database account. |
begin |
Online the specified region for the specified Azure Cosmos DB database account. |
begin |
Online the specified region for the specified Azure Cosmos DB database account. |
begin |
Regenerates an access key for the specified Azure Cosmos DB database account. |
begin |
Regenerates an access key for the specified Azure Cosmos DB database account. |
begin |
Updates the properties of an existing Azure Cosmos DB database account. |
begin |
Updates the properties of an existing Azure Cosmos DB database account. |
check |
Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters. |
get(string, string, Database |
Retrieves the properties of an existing Azure Cosmos DB database account. |
get |
Lists the read-only access keys for the specified Azure Cosmos DB database account. |
list(Database |
Lists all the Azure Cosmos DB database accounts available under the subscription. |
list |
Lists all the Azure Cosmos DB database accounts available under the given resource group. |
list |
Lists the connection strings for the specified Azure Cosmos DB database account. |
list |
Lists the access keys for the specified Azure Cosmos DB database account. |
list |
Retrieves metric definitions for the given database account. |
list |
Retrieves the metrics determined by the given filter for the given database account. |
list |
Lists the read-only access keys for the specified Azure Cosmos DB database account. |
list |
Retrieves the usages (most recent data) for the given database account. |
Method Details
beginCreateOrUpdate(string, string, DatabaseAccountCreateUpdateParameters, DatabaseAccountsCreateOrUpdateOptionalParams)
Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account.
function beginCreateOrUpdate(resourceGroupName: string, accountName: string, createUpdateParameters: DatabaseAccountCreateUpdateParameters, options?: DatabaseAccountsCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<DatabaseAccountGetResults>, DatabaseAccountGetResults>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- createUpdateParameters
- DatabaseAccountCreateUpdateParameters
The parameters to provide for the current database account.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<DatabaseAccountGetResults>, DatabaseAccountGetResults>>
beginCreateOrUpdateAndWait(string, string, DatabaseAccountCreateUpdateParameters, DatabaseAccountsCreateOrUpdateOptionalParams)
Creates or updates an Azure Cosmos DB database account. The "Update" method is preferred when performing updates on an account.
function beginCreateOrUpdateAndWait(resourceGroupName: string, accountName: string, createUpdateParameters: DatabaseAccountCreateUpdateParameters, options?: DatabaseAccountsCreateOrUpdateOptionalParams): Promise<DatabaseAccountGetResults>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- createUpdateParameters
- DatabaseAccountCreateUpdateParameters
The parameters to provide for the current database account.
The options parameters.
Returns
Promise<DatabaseAccountGetResults>
beginDelete(string, string, DatabaseAccountsDeleteOptionalParams)
Deletes an existing Azure Cosmos DB database account.
function beginDelete(resourceGroupName: string, accountName: string, options?: DatabaseAccountsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<DatabaseAccountsDeleteHeaders>, DatabaseAccountsDeleteHeaders>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<DatabaseAccountsDeleteHeaders>, DatabaseAccountsDeleteHeaders>>
beginDeleteAndWait(string, string, DatabaseAccountsDeleteOptionalParams)
Deletes an existing Azure Cosmos DB database account.
function beginDeleteAndWait(resourceGroupName: string, accountName: string, options?: DatabaseAccountsDeleteOptionalParams): Promise<DatabaseAccountsDeleteHeaders>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
Promise<DatabaseAccountsDeleteHeaders>
beginFailoverPriorityChange(string, string, FailoverPolicies, DatabaseAccountsFailoverPriorityChangeOptionalParams)
Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
function beginFailoverPriorityChange(resourceGroupName: string, accountName: string, failoverParameters: FailoverPolicies, options?: DatabaseAccountsFailoverPriorityChangeOptionalParams): Promise<SimplePollerLike<OperationState<DatabaseAccountsFailoverPriorityChangeHeaders>, DatabaseAccountsFailoverPriorityChangeHeaders>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- failoverParameters
- FailoverPolicies
The new failover policies for the database account.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<DatabaseAccountsFailoverPriorityChangeHeaders>, DatabaseAccountsFailoverPriorityChangeHeaders>>
beginFailoverPriorityChangeAndWait(string, string, FailoverPolicies, DatabaseAccountsFailoverPriorityChangeOptionalParams)
Changes the failover priority for the Azure Cosmos DB database account. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists.
function beginFailoverPriorityChangeAndWait(resourceGroupName: string, accountName: string, failoverParameters: FailoverPolicies, options?: DatabaseAccountsFailoverPriorityChangeOptionalParams): Promise<DatabaseAccountsFailoverPriorityChangeHeaders>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- failoverParameters
- FailoverPolicies
The new failover policies for the database account.
The options parameters.
Returns
beginOfflineRegion(string, string, RegionForOnlineOffline, DatabaseAccountsOfflineRegionOptionalParams)
Offline the specified region for the specified Azure Cosmos DB database account.
function beginOfflineRegion(resourceGroupName: string, accountName: string, regionParameterForOffline: RegionForOnlineOffline, options?: DatabaseAccountsOfflineRegionOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- regionParameterForOffline
- RegionForOnlineOffline
Cosmos DB region to offline for the database account.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>
beginOfflineRegionAndWait(string, string, RegionForOnlineOffline, DatabaseAccountsOfflineRegionOptionalParams)
Offline the specified region for the specified Azure Cosmos DB database account.
function beginOfflineRegionAndWait(resourceGroupName: string, accountName: string, regionParameterForOffline: RegionForOnlineOffline, options?: DatabaseAccountsOfflineRegionOptionalParams): Promise<void>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- regionParameterForOffline
- RegionForOnlineOffline
Cosmos DB region to offline for the database account.
The options parameters.
Returns
Promise<void>
beginOnlineRegion(string, string, RegionForOnlineOffline, DatabaseAccountsOnlineRegionOptionalParams)
Online the specified region for the specified Azure Cosmos DB database account.
function beginOnlineRegion(resourceGroupName: string, accountName: string, regionParameterForOnline: RegionForOnlineOffline, options?: DatabaseAccountsOnlineRegionOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- regionParameterForOnline
- RegionForOnlineOffline
Cosmos DB region to online for the database account.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>
beginOnlineRegionAndWait(string, string, RegionForOnlineOffline, DatabaseAccountsOnlineRegionOptionalParams)
Online the specified region for the specified Azure Cosmos DB database account.
function beginOnlineRegionAndWait(resourceGroupName: string, accountName: string, regionParameterForOnline: RegionForOnlineOffline, options?: DatabaseAccountsOnlineRegionOptionalParams): Promise<void>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- regionParameterForOnline
- RegionForOnlineOffline
Cosmos DB region to online for the database account.
The options parameters.
Returns
Promise<void>
beginRegenerateKey(string, string, DatabaseAccountRegenerateKeyParameters, DatabaseAccountsRegenerateKeyOptionalParams)
Regenerates an access key for the specified Azure Cosmos DB database account.
function beginRegenerateKey(resourceGroupName: string, accountName: string, keyToRegenerate: DatabaseAccountRegenerateKeyParameters, options?: DatabaseAccountsRegenerateKeyOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- keyToRegenerate
- DatabaseAccountRegenerateKeyParameters
The name of the key to regenerate.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<void>, void>>
beginRegenerateKeyAndWait(string, string, DatabaseAccountRegenerateKeyParameters, DatabaseAccountsRegenerateKeyOptionalParams)
Regenerates an access key for the specified Azure Cosmos DB database account.
function beginRegenerateKeyAndWait(resourceGroupName: string, accountName: string, keyToRegenerate: DatabaseAccountRegenerateKeyParameters, options?: DatabaseAccountsRegenerateKeyOptionalParams): Promise<void>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- keyToRegenerate
- DatabaseAccountRegenerateKeyParameters
The name of the key to regenerate.
The options parameters.
Returns
Promise<void>
beginUpdate(string, string, DatabaseAccountUpdateParameters, DatabaseAccountsUpdateOptionalParams)
Updates the properties of an existing Azure Cosmos DB database account.
function beginUpdate(resourceGroupName: string, accountName: string, updateParameters: DatabaseAccountUpdateParameters, options?: DatabaseAccountsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<DatabaseAccountGetResults>, DatabaseAccountGetResults>>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- updateParameters
- DatabaseAccountUpdateParameters
The parameters to provide for the current database account.
The options parameters.
Returns
Promise<@azure/core-lro.SimplePollerLike<OperationState<DatabaseAccountGetResults>, DatabaseAccountGetResults>>
beginUpdateAndWait(string, string, DatabaseAccountUpdateParameters, DatabaseAccountsUpdateOptionalParams)
Updates the properties of an existing Azure Cosmos DB database account.
function beginUpdateAndWait(resourceGroupName: string, accountName: string, updateParameters: DatabaseAccountUpdateParameters, options?: DatabaseAccountsUpdateOptionalParams): Promise<DatabaseAccountGetResults>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- updateParameters
- DatabaseAccountUpdateParameters
The parameters to provide for the current database account.
The options parameters.
Returns
Promise<DatabaseAccountGetResults>
checkNameExists(string, DatabaseAccountsCheckNameExistsOptionalParams)
Checks that the Azure Cosmos DB account name already exists. A valid account name may contain only lowercase letters, numbers, and the '-' character, and must be between 3 and 50 characters.
function checkNameExists(accountName: string, options?: DatabaseAccountsCheckNameExistsOptionalParams): Promise<DatabaseAccountsCheckNameExistsResponse>
Parameters
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
get(string, string, DatabaseAccountsGetOptionalParams)
Retrieves the properties of an existing Azure Cosmos DB database account.
function get(resourceGroupName: string, accountName: string, options?: DatabaseAccountsGetOptionalParams): Promise<DatabaseAccountGetResults>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
Promise<DatabaseAccountGetResults>
getReadOnlyKeys(string, string, DatabaseAccountsGetReadOnlyKeysOptionalParams)
Lists the read-only access keys for the specified Azure Cosmos DB database account.
function getReadOnlyKeys(resourceGroupName: string, accountName: string, options?: DatabaseAccountsGetReadOnlyKeysOptionalParams): Promise<DatabaseAccountListReadOnlyKeysResult>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
list(DatabaseAccountsListOptionalParams)
Lists all the Azure Cosmos DB database accounts available under the subscription.
function list(options?: DatabaseAccountsListOptionalParams): PagedAsyncIterableIterator<DatabaseAccountGetResults, DatabaseAccountGetResults[], PageSettings>
Parameters
The options parameters.
Returns
listByResourceGroup(string, DatabaseAccountsListByResourceGroupOptionalParams)
Lists all the Azure Cosmos DB database accounts available under the given resource group.
function listByResourceGroup(resourceGroupName: string, options?: DatabaseAccountsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<DatabaseAccountGetResults, DatabaseAccountGetResults[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
The options parameters.
Returns
listConnectionStrings(string, string, DatabaseAccountsListConnectionStringsOptionalParams)
Lists the connection strings for the specified Azure Cosmos DB database account.
function listConnectionStrings(resourceGroupName: string, accountName: string, options?: DatabaseAccountsListConnectionStringsOptionalParams): Promise<DatabaseAccountListConnectionStringsResult>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
listKeys(string, string, DatabaseAccountsListKeysOptionalParams)
Lists the access keys for the specified Azure Cosmos DB database account.
function listKeys(resourceGroupName: string, accountName: string, options?: DatabaseAccountsListKeysOptionalParams): Promise<DatabaseAccountListKeysResult>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
Promise<DatabaseAccountListKeysResult>
listMetricDefinitions(string, string, DatabaseAccountsListMetricDefinitionsOptionalParams)
Retrieves metric definitions for the given database account.
function listMetricDefinitions(resourceGroupName: string, accountName: string, options?: DatabaseAccountsListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator<MetricDefinition, MetricDefinition[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
listMetrics(string, string, string, DatabaseAccountsListMetricsOptionalParams)
Retrieves the metrics determined by the given filter for the given database account.
function listMetrics(resourceGroupName: string, accountName: string, filter: string, options?: DatabaseAccountsListMetricsOptionalParams): PagedAsyncIterableIterator<Metric, Metric[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
- filter
-
string
An OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
The options parameters.
Returns
listReadOnlyKeys(string, string, DatabaseAccountsListReadOnlyKeysOptionalParams)
Lists the read-only access keys for the specified Azure Cosmos DB database account.
function listReadOnlyKeys(resourceGroupName: string, accountName: string, options?: DatabaseAccountsListReadOnlyKeysOptionalParams): Promise<DatabaseAccountListReadOnlyKeysResult>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.
Returns
listUsages(string, string, DatabaseAccountsListUsagesOptionalParams)
Retrieves the usages (most recent data) for the given database account.
function listUsages(resourceGroupName: string, accountName: string, options?: DatabaseAccountsListUsagesOptionalParams): PagedAsyncIterableIterator<Usage, Usage[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group. The name is case insensitive.
- accountName
-
string
Cosmos DB database account name.
The options parameters.