Database interface

Interface representing a Database.

Methods

listMetricDefinitions(string, string, string, DatabaseListMetricDefinitionsOptionalParams)

Retrieves metric definitions for the given database.

listMetrics(string, string, string, string, DatabaseListMetricsOptionalParams)

Retrieves the metrics determined by the given filter for the given database account and database.

listUsages(string, string, string, DatabaseListUsagesOptionalParams)

Retrieves the usages (most recent data) for the given database.

Method Details

listMetricDefinitions(string, string, string, DatabaseListMetricDefinitionsOptionalParams)

Retrieves metric definitions for the given database.

function listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, options?: DatabaseListMetricDefinitionsOptionalParams): 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.

databaseRid

string

Cosmos DB database rid.

options
DatabaseListMetricDefinitionsOptionalParams

The options parameters.

Returns

listMetrics(string, string, string, string, DatabaseListMetricsOptionalParams)

Retrieves the metrics determined by the given filter for the given database account and database.

function listMetrics(resourceGroupName: string, accountName: string, databaseRid: string, filter: string, options?: DatabaseListMetricsOptionalParams): 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.

databaseRid

string

Cosmos DB database rid.

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.

options
DatabaseListMetricsOptionalParams

The options parameters.

Returns

listUsages(string, string, string, DatabaseListUsagesOptionalParams)

Retrieves the usages (most recent data) for the given database.

function listUsages(resourceGroupName: string, accountName: string, databaseRid: string, options?: DatabaseListUsagesOptionalParams): 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.

databaseRid

string

Cosmos DB database rid.

options
DatabaseListUsagesOptionalParams

The options parameters.

Returns