Table of Contents

Class CollectionOperationsExtensions

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

Extension methods for CollectionOperations.

public static class CollectionOperationsExtensions
Inheritance
CollectionOperationsExtensions
Inherited Members

Methods

ListMetricDefinitionsAsync(ICollectionOperations, string, string, string, string, CancellationToken)

Retrieves metric definitions for the given collection.

public static Task<IEnumerable<MetricDefinition>> ListMetricDefinitionsAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, CancellationToken cancellationToken = default)

Parameters

operations ICollectionOperations

The operations group for this extension method.

resourceGroupName string

Name of an Azure resource group.

accountName string

Cosmos DB database account name.

databaseRid string

Cosmos DB database rid.

collectionRid string

Cosmos DB collection rid.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IEnumerable<MetricDefinition>>

ListMetricsAsync(ICollectionOperations, string, string, string, string, string, CancellationToken)

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

public static Task<IEnumerable<Metric>> ListMetricsAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter, CancellationToken cancellationToken = default)

Parameters

operations ICollectionOperations

The operations group for this extension method.

resourceGroupName string

Name of an Azure resource group.

accountName string

Cosmos DB database account name.

databaseRid string

Cosmos DB database rid.

collectionRid string

Cosmos DB collection 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.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IEnumerable<Metric>>

ListUsagesAsync(ICollectionOperations, string, string, string, string, string, CancellationToken)

Retrieves the usages (most recent storage data) for the given collection.

public static Task<IEnumerable<Usage>> ListUsagesAsync(this ICollectionOperations operations, string resourceGroupName, string accountName, string databaseRid, string collectionRid, string filter = null, CancellationToken cancellationToken = default)

Parameters

operations ICollectionOperations

The operations group for this extension method.

resourceGroupName string

Name of an Azure resource group.

accountName string

Cosmos DB database account name.

databaseRid string

Cosmos DB database rid.

collectionRid string

Cosmos DB collection 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).

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IEnumerable<Usage>>