Table of Contents

Interface IDatabaseOperations

Namespace
Microsoft.Azure.Management.CosmosDB.Fluent
Assembly
Microsoft.Azure.Management.CosmosDB.Fluent.dll

DatabaseOperations operations.

public interface IDatabaseOperations
Extension Methods

Methods

ListMetricDefinitionsWithHttpMessagesAsync(string, string, string, Dictionary<string, List<string>>, CancellationToken)

Retrieves metric definitions for the given database.

Task<AzureOperationResponse<IEnumerable<MetricDefinition>>> ListMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseRid, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)

Parameters

resourceGroupName string

Name of an Azure resource group.

accountName string

Cosmos DB database account name.

databaseRid string

Cosmos DB database rid.

customHeaders Dictionary<string, List<string>>

The headers that will be added to request.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<AzureOperationResponse<IEnumerable<MetricDefinition>>>

Exceptions

Microsoft.Rest.Azure.CloudException

Thrown when the operation returned an invalid status code

Microsoft.Rest.SerializationException

Thrown when unable to deserialize the response

Microsoft.Rest.ValidationException

Thrown when a required parameter is null

ListMetricsWithHttpMessagesAsync(string, string, string, string, Dictionary<string, List<string>>, CancellationToken)

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

Task<AzureOperationResponse<IEnumerable<Metric>>> ListMetricsWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseRid, string filter, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)

Parameters

resourceGroupName string

Name of an Azure resource group.

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.

customHeaders Dictionary<string, List<string>>

The headers that will be added to request.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<AzureOperationResponse<IEnumerable<Metric>>>

Exceptions

Microsoft.Rest.Azure.CloudException

Thrown when the operation returned an invalid status code

Microsoft.Rest.SerializationException

Thrown when unable to deserialize the response

Microsoft.Rest.ValidationException

Thrown when a required parameter is null

ListUsagesWithHttpMessagesAsync(string, string, string, string, Dictionary<string, List<string>>, CancellationToken)

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

Task<AzureOperationResponse<IEnumerable<Usage>>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string accountName, string databaseRid, string filter = null, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default)

Parameters

resourceGroupName string

Name of an Azure resource group.

accountName string

Cosmos DB database account name.

databaseRid string

Cosmos DB database rid.

filter string

An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).

customHeaders Dictionary<string, List<string>>

The headers that will be added to request.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<AzureOperationResponse<IEnumerable<Usage>>>

Exceptions

Microsoft.Rest.Azure.CloudException

Thrown when the operation returned an invalid status code

Microsoft.Rest.SerializationException

Thrown when unable to deserialize the response

Microsoft.Rest.ValidationException

Thrown when a required parameter is null