Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-mgmt-cosmosdb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Cosmos DB Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
DatabaseAccountKind,
DatabaseAccountOfferType,
DefaultConsistencyLevel,
ConnectorOffer,
IndexingMode,
DataType,
IndexKind,
Expand Down Expand Up @@ -288,6 +289,7 @@
'DatabaseAccountKind',
'DatabaseAccountOfferType',
'DefaultConsistencyLevel',
'ConnectorOffer',
'IndexingMode',
'DataType',
'IndexKind',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ class DefaultConsistencyLevel(str, Enum):
consistent_prefix = "ConsistentPrefix"


class ConnectorOffer(str, Enum):

small = "Small"


class IndexingMode(str, Enum):

consistent = "Consistent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ class DatabaseAccount(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand Down Expand Up @@ -111,6 +117,8 @@ class DatabaseAccount(Resource):
'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -129,3 +137,5 @@ def __init__(self, **kwargs):
self.failover_policies = None
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None)
self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None)
self.connector_offer = kwargs.get('connector_offer', None)
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class DatabaseAccountCreateUpdateParameters(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand All @@ -92,6 +98,8 @@ class DatabaseAccountCreateUpdateParameters(Resource):
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

database_account_offer_type = "Standard"
Expand All @@ -107,3 +115,5 @@ def __init__(self, **kwargs):
self.capabilities = kwargs.get('capabilities', None)
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None)
self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None)
self.connector_offer = kwargs.get('connector_offer', None)
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ class DatabaseAccountCreateUpdateParameters(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand All @@ -92,11 +98,13 @@ class DatabaseAccountCreateUpdateParameters(Resource):
'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

database_account_offer_type = "Standard"

def __init__(self, *, locations, location: str=None, 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, enable_multiple_write_locations: bool=None, **kwargs) -> None:
def __init__(self, *, locations, location: str=None, 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, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None:
super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.consistency_policy = consistency_policy
Expand All @@ -107,3 +115,5 @@ def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocu
self.capabilities = capabilities
self.virtual_network_rules = virtual_network_rules
self.enable_multiple_write_locations = enable_multiple_write_locations
self.enable_cassandra_connector = enable_cassandra_connector
self.connector_offer = connector_offer
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,44 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .database_account_list_read_only_keys_result import DatabaseAccountListReadOnlyKeysResult


class DatabaseAccountListKeysResult(Model):
class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult):
"""The access keys for the given database account.

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

:ivar primary_master_key: Base 64 encoded value of the primary read-write
key.
:vartype primary_master_key: str
:ivar secondary_master_key: Base 64 encoded value of the secondary
read-write key.
:vartype secondary_master_key: str
:ivar primary_readonly_master_key: Base 64 encoded value of the primary
read-only key.
:vartype primary_readonly_master_key: str
:ivar secondary_readonly_master_key: Base 64 encoded value of the
secondary read-only key.
:vartype secondary_readonly_master_key: str
:ivar primary_master_key: Base 64 encoded value of the primary read-write
key.
:vartype primary_master_key: str
:ivar secondary_master_key: Base 64 encoded value of the secondary
read-write key.
:vartype secondary_master_key: str
"""

_validation = {
'primary_master_key': {'readonly': True},
'secondary_master_key': {'readonly': True},
'primary_readonly_master_key': {'readonly': True},
'secondary_readonly_master_key': {'readonly': True},
'primary_master_key': {'readonly': True},
'secondary_master_key': {'readonly': True},
}

_attribute_map = {
'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'},
'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'},
'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'},
'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'},
'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'},
'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DatabaseAccountListKeysResult, self).__init__(**kwargs)
self.primary_master_key = None
self.secondary_master_key = None
self.primary_readonly_master_key = None
self.secondary_readonly_master_key = None
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,44 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from .database_account_list_read_only_keys_result_py3 import DatabaseAccountListReadOnlyKeysResult


class DatabaseAccountListKeysResult(Model):
class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult):
"""The access keys for the given database account.

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

:ivar primary_master_key: Base 64 encoded value of the primary read-write
key.
:vartype primary_master_key: str
:ivar secondary_master_key: Base 64 encoded value of the secondary
read-write key.
:vartype secondary_master_key: str
:ivar primary_readonly_master_key: Base 64 encoded value of the primary
read-only key.
:vartype primary_readonly_master_key: str
:ivar secondary_readonly_master_key: Base 64 encoded value of the
secondary read-only key.
:vartype secondary_readonly_master_key: str
:ivar primary_master_key: Base 64 encoded value of the primary read-write
key.
:vartype primary_master_key: str
:ivar secondary_master_key: Base 64 encoded value of the secondary
read-write key.
:vartype secondary_master_key: str
"""

_validation = {
'primary_master_key': {'readonly': True},
'secondary_master_key': {'readonly': True},
'primary_readonly_master_key': {'readonly': True},
'secondary_readonly_master_key': {'readonly': True},
'primary_master_key': {'readonly': True},
'secondary_master_key': {'readonly': True},
}

_attribute_map = {
'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'},
'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'},
'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'},
'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'},
'primary_readonly_master_key': {'key': 'properties.primaryReadonlyMasterKey', 'type': 'str'},
'secondary_readonly_master_key': {'key': 'properties.secondaryReadonlyMasterKey', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(DatabaseAccountListKeysResult, self).__init__(**kwargs)
self.primary_master_key = None
self.secondary_master_key = None
self.primary_readonly_master_key = None
self.secondary_readonly_master_key = None
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ class DatabaseAccount(Resource):
:param enable_multiple_write_locations: Enables the account to write in
multiple locations
:type enable_multiple_write_locations: bool
:param enable_cassandra_connector: Enables the cassandra connector on the
Cosmos DB C* account
:type enable_cassandra_connector: bool
:param connector_offer: The cassandra connector offer type for the Cosmos
DB database C* account. Possible values include: 'Small'
:type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer
"""

_validation = {
Expand Down Expand Up @@ -111,9 +117,11 @@ class DatabaseAccount(Resource):
'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'},
'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'},
'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'},
'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'},
}

def __init__(self, *, location: str=None, 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, enable_multiple_write_locations: bool=None, **kwargs) -> None:
def __init__(self, *, location: str=None, 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, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, **kwargs) -> None:
super(DatabaseAccount, self).__init__(location=location, tags=tags, **kwargs)
self.kind = kind
self.provisioning_state = provisioning_state
Expand All @@ -129,3 +137,5 @@ def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", pr
self.failover_policies = None
self.virtual_network_rules = virtual_network_rules
self.enable_multiple_write_locations = enable_multiple_write_locations
self.enable_cassandra_connector = enable_cassandra_connector
self.connector_offer = connector_offer
1 change: 0 additions & 1 deletion sdk/cosmos/azure-mgmt-cosmosdb/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down