CollectionOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:collection> attribute.
- Inheritance
-
builtins.objectCollectionOperations
Constructor
CollectionOperations(*args, **kwargs)
Methods
list_metric_definitions |
Retrieves metric definitions for the given collection. |
list_metrics |
Retrieves the metrics determined by the given filter for the given database account and collection. |
list_usages |
Retrieves the usages (most recent storage data) for the given collection. |
list_metric_definitions
Retrieves metric definitions for the given collection.
list_metric_definitions(resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, **kwargs: Any) -> AsyncIterable[MetricDefinition]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
account_name
Required
|
Cosmos DB database account name. Required. |
database_rid
Required
|
Cosmos DB database rid. Required. |
collection_rid
Required
|
Cosmos DB collection rid. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either MetricDefinition or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_metrics
Retrieves the metrics determined by the given filter for the given database account and collection.
list_metrics(resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, filter: str, **kwargs: Any) -> AsyncIterable[Metric]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
account_name
Required
|
Cosmos DB database account name. Required. |
database_rid
Required
|
Cosmos DB database rid. Required. |
collection_rid
Required
|
Cosmos DB collection rid. Required. |
filter
Required
|
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. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either Metric or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_usages
Retrieves the usages (most recent storage data) for the given collection.
list_usages(resource_group_name: str, account_name: str, database_rid: str, collection_rid: str, filter: str | None = None, **kwargs: Any) -> AsyncIterable[Usage]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
account_name
Required
|
Cosmos DB database account name. Required. |
database_rid
Required
|
Cosmos DB database rid. Required. |
collection_rid
Required
|
Cosmos DB collection rid. Required. |
filter
Required
|
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). Default value is None. |
Returns
Type | Description |
---|---|
An iterator like instance of either Usage or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.cosmosdb.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\cosmosdb\\models\\__init__.py'>
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for