azure.mgmt.cosmosdb.models module¶
-
class
azure.mgmt.cosmosdb.models.ConsistencyPolicy(*, default_consistency_level, max_staleness_prefix: int = None, max_interval_in_seconds: int = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe consistency policy for the Cosmos DB database account.
All required parameters must be populated in order to send to Azure.
Parameters: - default_consistency_level (str or DefaultConsistencyLevel) – Required. The default consistency level and configuration settings of the Cosmos DB account. Possible values include: ‘Eventual’, ‘Session’, ‘BoundedStaleness’, ‘Strong’, ‘ConsistentPrefix’
- max_staleness_prefix (long) – When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set to ‘BoundedStaleness’.
- max_interval_in_seconds (int) – When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is set to ‘BoundedStaleness’.
-
class
azure.mgmt.cosmosdb.models.Capability(*, name: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelCosmos DB capability object.
Parameters: name (str) – Name of the Cosmos DB capability. For example, “name”: “EnableCassandra”. Current values also include “EnableTable” and “EnableGremlin”.
-
class
azure.mgmt.cosmosdb.models.Location(*, location_name: str = None, provisioning_state: str = None, failover_priority: int = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelA region in which the Azure Cosmos DB database account is deployed.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - id (str) – The unique identifier of the region within the database account. Example: <accountName>-<locationName>.
- document_endpoint (str) – The connection endpoint for the specific region. Example: https://<accountName>-<locationName>.documents.azure.com:443/
Parameters: - location_name (str) – The name of the region.
- provisioning_state (str) –
- failover_priority (int) – The failover priority of the region. 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.
-
class
azure.mgmt.cosmosdb.models.FailoverPolicy(*, location_name: str = None, failover_priority: int = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe failover policy for a given region of a database account.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: id (str) – The unique identifier of the region in which the database account replicates to. Example: <accountName>-<locationName>.
Parameters: - location_name (str) – The name of the region in which the database account exists.
- failover_priority (int) – The failover priority of the region. 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.
-
class
azure.mgmt.cosmosdb.models.VirtualNetworkRule(*, id: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelVirtual Network ACL Rule object.
Parameters: id (str) – Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
-
class
azure.mgmt.cosmosdb.models.DatabaseAccount(*, location: str, tags=None, kind='GlobalDocumentDB', provisioning_state: str = None, ip_range_filter: str = None, is_virtual_network_filter_enabled: bool = None, enable_automatic_failover: bool = None, consistency_policy=None, capabilities=None, virtual_network_rules=None, **kwargs)[source]¶ Bases:
azure.mgmt.cosmosdb.models.resource_py3.ResourceAn Azure Cosmos DB database account.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
Variables: - id (str) – The unique resource identifier of the database account.
- name (str) – The name of the database account.
- type (str) – The type of Azure resource.
- document_endpoint (str) – The connection endpoint for the Cosmos DB database account.
- database_account_offer_type (str or DatabaseAccountOfferType) – The offer type for the Cosmos DB database account. Default value: Standard. Possible values include: ‘Standard’
- write_locations (list[Location]) – An array that contains the write location for the Cosmos DB account.
- read_locations (list[Location]) – An array that contains of the read locations enabled for the Cosmos DB account.
- failover_policies (list[FailoverPolicy]) – An array that contains the regions ordered by their failover priorities.
Parameters: - location (str) – Required. The location of the resource group to which the resource belongs.
- tags (dict[str, str]) –
- kind (str or DatabaseAccountKind) – Indicates the type of database account. This can only be set at database account creation. Possible values include: ‘GlobalDocumentDB’, ‘MongoDB’, ‘Parse’. Default value: “GlobalDocumentDB” .
- provisioning_state (str) –
- ip_range_filter (str) – Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
- is_virtual_network_filter_enabled (bool) – Flag to indicate whether to enable/disable Virtual Network ACL rules.
- enable_automatic_failover (bool) – Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
- consistency_policy (ConsistencyPolicy) – The consistency policy for the Cosmos DB database account.
- capabilities (list[Capability]) – List of Cosmos DB capabilities for the account
- virtual_network_rules (list[VirtualNetworkRule]) – List of Virtual Network ACL rules configured for the Cosmos DB account.
-
class
azure.mgmt.cosmosdb.models.ErrorResponse(*, code: str = None, message: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelError Response.
Parameters: - code (str) – Error code.
- message (str) – Error message indicating why the operation failed.
-
exception
azure.mgmt.cosmosdb.models.ErrorResponseException(deserialize, response, *args)[source]¶ Bases:
msrest.exceptions.HttpOperationErrorServer responsed with exception of type: ‘ErrorResponse’.
Parameters: - deserialize – A deserializer
- response – Server response to be deserialized.
-
class
azure.mgmt.cosmosdb.models.FailoverPolicies(*, failover_policies, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe list of new failover policies for the failover priority change.
All required parameters must be populated in order to send to Azure.
Parameters: failover_policies (list[FailoverPolicy]) – Required. List of failover policies.
-
class
azure.mgmt.cosmosdb.models.RegionForOnlineOffline(*, region: str, **kwargs)[source]¶ Bases:
msrest.serialization.ModelCosmos DB region to online or offline.
All required parameters must be populated in order to send to Azure.
Parameters: region (str) – Required. Cosmos DB region, with spaces between words and each word capitalized.
-
class
azure.mgmt.cosmosdb.models.Resource(*, location: str, tags=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelA database account resource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
Variables: Parameters: - location (str) – Required. The location of the resource group to which the resource belongs.
- tags (dict[str, str]) –
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateParameters(*, location: str, locations, tags=None, kind='GlobalDocumentDB', consistency_policy=None, ip_range_filter: str = None, is_virtual_network_filter_enabled: bool = None, enable_automatic_failover: bool = None, capabilities=None, virtual_network_rules=None, **kwargs)[source]¶ Bases:
azure.mgmt.cosmosdb.models.resource_py3.ResourceParameters to create and update Cosmos DB database accounts.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
Variables: - id (str) – The unique resource identifier of the database account.
- name (str) – The name of the database account.
- type (str) – The type of Azure resource.
- database_account_offer_type (str) – Required. Default value: “Standard” .
Parameters: - location (str) – Required. The location of the resource group to which the resource belongs.
- tags (dict[str, str]) –
- kind (str or DatabaseAccountKind) – Indicates the type of database account. This can only be set at database account creation. Possible values include: ‘GlobalDocumentDB’, ‘MongoDB’, ‘Parse’. Default value: “GlobalDocumentDB” .
- consistency_policy (ConsistencyPolicy) – The consistency policy for the Cosmos DB account.
- locations (list[Location]) – Required. An array that contains the georeplication locations enabled for the Cosmos DB account.
- ip_range_filter (str) – Cosmos DB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces.
- is_virtual_network_filter_enabled (bool) – Flag to indicate whether to enable/disable Virtual Network ACL rules.
- enable_automatic_failover (bool) – Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account.
- capabilities (list[Capability]) – List of Cosmos DB capabilities for the account
- virtual_network_rules (list[VirtualNetworkRule]) – List of Virtual Network ACL rules configured for the Cosmos DB account.
-
database_account_offer_type= 'Standard'¶
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountPatchParameters(*, tags=None, capabilities=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelParameters for patching Azure Cosmos DB database account properties.
Parameters: - tags (dict[str, str]) –
- capabilities (list[Capability]) – List of Cosmos DB capabilities for the account
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountListReadOnlyKeysResult(**kwargs)[source]¶ Bases:
msrest.serialization.ModelThe read-only access keys for the given database account.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - primary_readonly_master_key (str) – Base 64 encoded value of the primary read-only key.
- secondary_readonly_master_key (str) – Base 64 encoded value of the secondary read-only key.
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountListKeysResult(**kwargs)[source]¶ Bases:
msrest.serialization.ModelThe access keys for the given database account.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - primary_master_key (str) – Base 64 encoded value of the primary read-write key.
- secondary_master_key (str) – Base 64 encoded value of the secondary read-write key.
- primary_readonly_master_key (str) – Base 64 encoded value of the primary read-only key.
- secondary_readonly_master_key (str) – Base 64 encoded value of the secondary read-only key.
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString(**kwargs)[source]¶ Bases:
msrest.serialization.ModelConnection string for the Cosmos DB account.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - connection_string (str) – Value of the connection string
- description (str) – Description of the connection string
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountListConnectionStringsResult(*, connection_strings=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe connection strings for the given database account.
Parameters: connection_strings (list[DatabaseAccountConnectionString]) – An array that contains the connection strings for the Cosmos DB account.
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountRegenerateKeyParameters(*, key_kind, **kwargs)[source]¶ Bases:
msrest.serialization.ModelParameters to regenerate the keys within the database account.
All required parameters must be populated in order to send to Azure.
Parameters: key_kind (str or KeyKind) – Required. The access key to regenerate. Possible values include: ‘primary’, ‘secondary’, ‘primaryReadonly’, ‘secondaryReadonly’
-
class
azure.mgmt.cosmosdb.models.OperationDisplay(*, provider: str = None, resource: str = None, operation: str = None, description: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe object that represents the operation.
Parameters: - provider (str) – Service provider: Microsoft.ResourceProvider
- resource (str) – Resource on which the operation is performed: Profile, endpoint, etc.
- operation (str) – Operation type: Read, write, delete, etc.
- description (str) – Description of operation
-
class
azure.mgmt.cosmosdb.models.Operation(*, name: str = None, display=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelREST API operation.
Parameters: - name (str) – Operation name: {provider}/{resource}/{operation}
- display (OperationDisplay) – The object that represents the operation.
-
class
azure.mgmt.cosmosdb.models.MetricName(**kwargs)[source]¶ Bases:
msrest.serialization.ModelA metric name.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - value (str) – The name of the metric.
- localized_value (str) – The friendly name of the metric.
-
class
azure.mgmt.cosmosdb.models.Usage(*, unit=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe usage data for a usage request.
Variables are only populated by the server, and will be ignored when sending a request.
Parameters: unit (str or UnitType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’, ‘Milliseconds’
Variables: - name (MetricName) – The name information for the metric.
- quota_period (str) – The quota period used to summarize the usage values.
- limit (int) – Maximum value for this metric
- current_value (int) – Current value for this metric
-
class
azure.mgmt.cosmosdb.models.PartitionUsage(*, unit=None, **kwargs)[source]¶ Bases:
azure.mgmt.cosmosdb.models.usage_py3.UsageThe partition level usage data for a usage request.
Variables are only populated by the server, and will be ignored when sending a request.
Parameters: unit (str or UnitType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’, ‘Milliseconds’
Variables: - name (MetricName) – The name information for the metric.
- quota_period (str) – The quota period used to summarize the usage values.
- limit (int) – Maximum value for this metric
- current_value (int) – Current value for this metric
- partition_id (str) – The parition id (GUID identifier) of the usages.
- partition_key_range_id (str) – The partition key range id (integer identifier) of the usages.
-
class
azure.mgmt.cosmosdb.models.MetricAvailability(**kwargs)[source]¶ Bases:
msrest.serialization.ModelThe availability of the metric.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - time_grain (str) – The time grain to be used to summarize the metric values.
- retention (str) – The retention for the metric values.
-
class
azure.mgmt.cosmosdb.models.MetricDefinition(*, unit=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelThe definition of a metric.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - metric_availabilities (list[MetricAvailability]) – The list of metric availabilities for the account.
- primary_aggregation_type (str or PrimaryAggregationType) – The primary aggregation type of the metric. Possible values include: ‘None’, ‘Average’, ‘Total’, ‘Minimimum’, ‘Maximum’, ‘Last’
- resource_uri (str) – The resource uri of the database.
- name (MetricName) – The name information for the metric.
Parameters: unit (str or UnitType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’, ‘Milliseconds’
-
class
azure.mgmt.cosmosdb.models.MetricValue(**kwargs)[source]¶ Bases:
msrest.serialization.ModelRepresents metrics values.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - _count (float) – The number of values for the metric.
- average (float) – The average value of the metric.
- maximum (float) – The max value of the metric.
- minimum (float) – The min value of the metric.
- timestamp (datetime) – The metric timestamp (ISO-8601 format).
- total (float) – The total value of the metric.
-
class
azure.mgmt.cosmosdb.models.Metric(*, unit=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelMetric data.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - start_time (datetime) – The start time for the metric (ISO-8601 format).
- end_time (datetime) – The end time for the metric (ISO-8601 format).
- time_grain (str) – The time grain to be used to summarize the metric values.
- name (MetricName) – The name information for the metric.
- metric_values (list[MetricValue]) – The metric values for the specified time window and timestep.
Parameters: unit (str or UnitType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’, ‘Milliseconds’
-
class
azure.mgmt.cosmosdb.models.PercentileMetricValue(**kwargs)[source]¶ Bases:
azure.mgmt.cosmosdb.models.metric_value_py3.MetricValueRepresents percentile metrics values.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - _count (float) – The number of values for the metric.
- average (float) – The average value of the metric.
- maximum (float) – The max value of the metric.
- minimum (float) – The min value of the metric.
- timestamp (datetime) – The metric timestamp (ISO-8601 format).
- total (float) – The total value of the metric.
- p10 (float) – The 10th percentile value for the metric.
- p25 (float) – The 25th percentile value for the metric.
- p50 (float) – The 50th percentile value for the metric.
- p75 (float) – The 75th percentile value for the metric.
- p90 (float) – The 90th percentile value for the metric.
- p95 (float) – The 95th percentile value for the metric.
- p99 (float) – The 99th percentile value for the metric.
-
class
azure.mgmt.cosmosdb.models.PercentileMetric(*, unit=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelPercentile Metric data.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - start_time (datetime) – The start time for the metric (ISO-8601 format).
- end_time (datetime) – The end time for the metric (ISO-8601 format).
- time_grain (str) – The time grain to be used to summarize the metric values.
- name (MetricName) – The name information for the metric.
- metric_values (list[PercentileMetricValue]) – The percentile metric values for the specified time window and timestep.
Parameters: unit (str or UnitType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’, ‘Milliseconds’
-
class
azure.mgmt.cosmosdb.models.PartitionMetric(*, unit=None, **kwargs)[source]¶ Bases:
azure.mgmt.cosmosdb.models.metric_py3.MetricThe metric values for a single partition.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - start_time (datetime) – The start time for the metric (ISO-8601 format).
- end_time (datetime) – The end time for the metric (ISO-8601 format).
- time_grain (str) – The time grain to be used to summarize the metric values.
- name (MetricName) – The name information for the metric.
- metric_values (list[MetricValue]) – The metric values for the specified time window and timestep.
- partition_id (str) – The parition id (GUID identifier) of the metric values.
- partition_key_range_id (str) – The partition key range id (integer identifier) of the metric values.
Parameters: unit (str or UnitType) – The unit of the metric. Possible values include: ‘Count’, ‘Bytes’, ‘Seconds’, ‘Percent’, ‘CountPerSecond’, ‘BytesPerSecond’, ‘Milliseconds’
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountPaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
DatabaseAccountobject
-
class
azure.mgmt.cosmosdb.models.MetricPaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
Metricobject
-
class
azure.mgmt.cosmosdb.models.UsagePaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
Usageobject
-
class
azure.mgmt.cosmosdb.models.MetricDefinitionPaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
MetricDefinitionobject
-
class
azure.mgmt.cosmosdb.models.OperationPaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
Operationobject
-
class
azure.mgmt.cosmosdb.models.PercentileMetricPaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
PercentileMetricobject
-
class
azure.mgmt.cosmosdb.models.PartitionMetricPaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
PartitionMetricobject
-
class
azure.mgmt.cosmosdb.models.PartitionUsagePaged(*args, **kwargs)[source]¶ Bases:
msrest.paging.PagedA paging container for iterating over a list of
PartitionUsageobject
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountKind[source]¶ Bases:
str,enum.EnumAn enumeration.
-
global_document_db= 'GlobalDocumentDB'¶
-
mongo_db= 'MongoDB'¶
-
parse= 'Parse'¶
-
-
class
azure.mgmt.cosmosdb.models.DatabaseAccountOfferType[source]¶ Bases:
str,enum.EnumAn enumeration.
-
standard= 'Standard'¶
-
-
class
azure.mgmt.cosmosdb.models.DefaultConsistencyLevel[source]¶ Bases:
str,enum.EnumAn enumeration.
-
bounded_staleness= 'BoundedStaleness'¶
-
consistent_prefix= 'ConsistentPrefix'¶
-
eventual= 'Eventual'¶
-
session= 'Session'¶
-
strong= 'Strong'¶
-
-
class
azure.mgmt.cosmosdb.models.KeyKind[source]¶ Bases:
str,enum.EnumAn enumeration.
-
primary= 'primary'¶
-
primary_readonly= 'primaryReadonly'¶
-
secondary= 'secondary'¶
-
secondary_readonly= 'secondaryReadonly'¶
-