azure.mgmt.documentdb.models module

class azure.mgmt.documentdb.models.ConsistencyPolicy(default_consistency_level, max_staleness_prefix=None, max_interval_in_seconds=None)[source]

Bases: msrest.serialization.Model

The consistency policy for the DocumentDB database account.

Parameters:
  • default_consistency_level (str or DefaultConsistencyLevel) – The default consistency level and configuration settings of the DocumentDB 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 1 - 100. Required when defaultConsistencyPolicy is set to ‘BoundedStaleness’.
class azure.mgmt.documentdb.models.Location(location_name=None, provisioning_state=None, failover_priority=None)[source]

Bases: msrest.serialization.Model

A region in which the Azure DocumentDB database account is deployed.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
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.documentdb.models.FailoverPolicy(location_name=None, failover_priority=None)[source]

Bases: msrest.serialization.Model

The 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.documentdb.models.DatabaseAccount(location, tags=None, kind='GlobalDocumentDB', provisioning_state=None, ip_range_filter=None, enable_automatic_failover=None, consistency_policy=None)[source]

Bases: azure.mgmt.documentdb.models.resource.Resource

A DocumentDB database account.

Variables are only populated by the server, and will be ignored when sending a request.

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 DocumentDB database account.
  • database_account_offer_type (str or DatabaseAccountOfferType) – The offer type for the DocumentDB database account. Default value: Standard. Possible values include: ‘Standard’
  • write_locations (list of Location) – An array that contains the write location for the DocumentDB account.
  • read_locations (list of Location) – An array that contains of the read locations enabled for the DocumentDB account.
  • failover_policies (list of FailoverPolicy) – An array that contains the regions ordered by their failover priorities.
Parameters:
  • location (str) – The location of the resource group to which the resource belongs.
  • tags (dict) –
  • 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) – DocumentDB 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.
  • 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 DocumentDB database account.
class azure.mgmt.documentdb.models.FailoverPolicies(failover_policies=None)[source]

Bases: msrest.serialization.Model

The list of new failover policies for the failover priority change.

Parameters:failover_policies (list of FailoverPolicy) – List of failover policies.
class azure.mgmt.documentdb.models.Resource(location, tags=None)[source]

Bases: msrest.serialization.Model

A database account resource.

Variables are only populated by the server, and will be ignored when sending a request.

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.
Parameters:
  • location (str) – The location of the resource group to which the resource belongs.
  • tags (dict) –
class azure.mgmt.documentdb.models.DatabaseAccountCreateUpdateParameters(location, locations, tags=None, kind='GlobalDocumentDB', consistency_policy=None, ip_range_filter=None, enable_automatic_failover=None)[source]

Bases: azure.mgmt.documentdb.models.resource.Resource

Parameters to create and update DocumentDB database accounts.

Variables are only populated by the server, and will be ignored when sending a request.

Variables:
Parameters:
  • location (str) – The location of the resource group to which the resource belongs.
  • tags (dict) –
  • 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 DocumentDB account.
  • locations (list of Location) – An array that contains the georeplication locations enabled for the DocumentDB account.
  • ip_range_filter (str) – DocumentDB 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.
  • 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.
database_account_offer_type = 'Standard'
class azure.mgmt.documentdb.models.DatabaseAccountPatchParameters(tags)[source]

Bases: msrest.serialization.Model

Parameters for patching Azure DocumentDB database account properties.

Parameters:tags (dict) –
class azure.mgmt.documentdb.models.DatabaseAccountListReadOnlyKeysResult[source]

Bases: msrest.serialization.Model

The 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.documentdb.models.DatabaseAccountListKeysResult[source]

Bases: msrest.serialization.Model

The 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.documentdb.models.DatabaseAccountConnectionString[source]

Bases: msrest.serialization.Model

Connection string for the DocumentDB 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.documentdb.models.DatabaseAccountListConnectionStringsResult(connection_strings=None)[source]

Bases: msrest.serialization.Model

The connection strings for the given database account.

Parameters:connection_strings (list of DatabaseAccountConnectionString) – An array that contains the connection strings for the DocumentDB account.
class azure.mgmt.documentdb.models.DatabaseAccountRegenerateKeyParameters(key_kind)[source]

Bases: msrest.serialization.Model

Parameters to regenerate the keys within the database account.

Parameters:key_kind (str or KeyKind) – The access key to regenerate. Possible values include: ‘primary’, ‘secondary’, ‘primaryReadonly’, ‘secondaryReadonly’
class azure.mgmt.documentdb.models.DatabaseAccountPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of DatabaseAccount object

class azure.mgmt.documentdb.models.DatabaseAccountKind[source]

Bases: enum.Enum

global_document_db = 'GlobalDocumentDB'
mongo_db = 'MongoDB'
parse = 'Parse'
class azure.mgmt.documentdb.models.DatabaseAccountOfferType[source]

Bases: enum.Enum

standard = 'Standard'
class azure.mgmt.documentdb.models.DefaultConsistencyLevel[source]

Bases: enum.Enum

bounded_staleness = 'BoundedStaleness'
consistent_prefix = 'ConsistentPrefix'
eventual = 'Eventual'
session = 'Session'
strong = 'Strong'
class azure.mgmt.documentdb.models.KeyKind[source]

Bases: enum.Enum

primary = 'primary'
primary_readonly = 'primaryReadonly'
secondary = 'secondary'
secondary_readonly = 'secondaryReadonly'