diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md index e0f7b2da8269..d01e6c3b677d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md +++ b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md @@ -58,6 +58,13 @@ - Model DatabaseAccountCreateUpdateParameters has a new signature +## 3.1.0 (2021-04-07) + +**Features** + + - Model DatabaseAccountUpdateParameters has a new parameter default_identity + - Model DatabaseAccountGetResults has a new parameter default_identity + ## 3.0.0 (2021-02-18) **Features** diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py index 474b9a2defc7..713d8cdb3404 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py @@ -31,23 +31,14 @@ from .operations import TableResourcesOperations from .operations import CassandraResourcesOperations from .operations import GremlinResourcesOperations -from .operations import RestorableDatabaseAccountsOperations from .operations import NotebookWorkspacesOperations -from .operations import RestorableSqlDatabasesOperations -from .operations import RestorableSqlContainersOperations -from .operations import RestorableSqlResourcesOperations -from .operations import RestorableMongodbDatabasesOperations -from .operations import RestorableMongodbCollectionsOperations -from .operations import RestorableMongodbResourcesOperations -from .operations import CassandraClustersOperations -from .operations import CassandraDataCentersOperations from .operations import PrivateLinkResourcesOperations from .operations import PrivateEndpointConnectionsOperations from . import models class CosmosDBManagementClient(SDKClient): - """CosmosDBManagementClient + """Azure Cosmos DB Database Service Resource Provider REST API :ivar config: Configuration for client. :vartype config: CosmosDBManagementClientConfiguration @@ -88,26 +79,8 @@ class CosmosDBManagementClient(SDKClient): :vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations :ivar gremlin_resources: GremlinResources operations :vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations - :ivar restorable_database_accounts: RestorableDatabaseAccounts operations - :vartype restorable_database_accounts: azure.mgmt.cosmosdb.operations.RestorableDatabaseAccountsOperations :ivar notebook_workspaces: NotebookWorkspaces operations :vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations - :ivar restorable_sql_databases: RestorableSqlDatabases operations - :vartype restorable_sql_databases: azure.mgmt.cosmosdb.operations.RestorableSqlDatabasesOperations - :ivar restorable_sql_containers: RestorableSqlContainers operations - :vartype restorable_sql_containers: azure.mgmt.cosmosdb.operations.RestorableSqlContainersOperations - :ivar restorable_sql_resources: RestorableSqlResources operations - :vartype restorable_sql_resources: azure.mgmt.cosmosdb.operations.RestorableSqlResourcesOperations - :ivar restorable_mongodb_databases: RestorableMongodbDatabases operations - :vartype restorable_mongodb_databases: azure.mgmt.cosmosdb.operations.RestorableMongodbDatabasesOperations - :ivar restorable_mongodb_collections: RestorableMongodbCollections operations - :vartype restorable_mongodb_collections: azure.mgmt.cosmosdb.operations.RestorableMongodbCollectionsOperations - :ivar restorable_mongodb_resources: RestorableMongodbResources operations - :vartype restorable_mongodb_resources: azure.mgmt.cosmosdb.operations.RestorableMongodbResourcesOperations - :ivar cassandra_clusters: CassandraClusters operations - :vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations - :ivar cassandra_data_centers: CassandraDataCenters operations - :vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations :ivar private_link_resources: PrivateLinkResources operations :vartype private_link_resources: azure.mgmt.cosmosdb.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnections operations @@ -128,7 +101,7 @@ def __init__( super(CosmosDBManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2021-03-01-preview' + self.api_version = '2021-03-15' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -168,26 +141,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.gremlin_resources = GremlinResourcesOperations( self._client, self.config, self._serialize, self._deserialize) - self.restorable_database_accounts = RestorableDatabaseAccountsOperations( - self._client, self.config, self._serialize, self._deserialize) self.notebook_workspaces = NotebookWorkspacesOperations( self._client, self.config, self._serialize, self._deserialize) - self.restorable_sql_databases = RestorableSqlDatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restorable_sql_containers = RestorableSqlContainersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restorable_sql_resources = RestorableSqlResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restorable_mongodb_databases = RestorableMongodbDatabasesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restorable_mongodb_collections = RestorableMongodbCollectionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.restorable_mongodb_resources = RestorableMongodbResourcesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.cassandra_clusters = CassandraClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.cassandra_data_centers = CassandraDataCentersOperations( - self._client, self.config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self.config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index a11171da649a..dc286f094cb5 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -18,8 +18,6 @@ from ._models_py3 import AutoUpgradePolicyResource from ._models_py3 import AzureEntityResource from ._models_py3 import BackupPolicy - from ._models_py3 import BackupResource - from ._models_py3 import BackupResourceProperties from ._models_py3 import Capability from ._models_py3 import CassandraKeyspaceCreateUpdateParameters from ._models_py3 import CassandraKeyspaceGetPropertiesOptions @@ -33,12 +31,7 @@ from ._models_py3 import CassandraTableGetPropertiesResource from ._models_py3 import CassandraTableGetResults from ._models_py3 import CassandraTableResource - from ._models_py3 import Certificate from ._models_py3 import ClusterKey - from ._models_py3 import ClusterNodeStatus - from ._models_py3 import ClusterNodeStatusNodesItem - from ._models_py3 import ClusterResource - from ._models_py3 import ClusterResourceProperties from ._models_py3 import Column from ._models_py3 import CompositePath from ._models_py3 import ConflictResolutionPolicy @@ -49,18 +42,14 @@ from ._models_py3 import CreateUpdateOptions from ._models_py3 import DatabaseAccountConnectionString from ._models_py3 import DatabaseAccountCreateUpdateParameters - from ._models_py3 import DatabaseAccountCreateUpdateProperties from ._models_py3 import DatabaseAccountGetResults from ._models_py3 import DatabaseAccountListConnectionStringsResult from ._models_py3 import DatabaseAccountListKeysResult from ._models_py3 import DatabaseAccountListReadOnlyKeysResult from ._models_py3 import DatabaseAccountRegenerateKeyParameters from ._models_py3 import DatabaseAccountUpdateParameters - from ._models_py3 import DatabaseRestoreResource - from ._models_py3 import DataCenterResource - from ._models_py3 import DataCenterResourceProperties - from ._models_py3 import DefaultRequestDatabaseAccountCreateUpdateProperties from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponseUpdatedFormat, ErrorResponseUpdatedFormatException from ._models_py3 import ExcludedPath from ._models_py3 import ExtendedResourceProperties from ._models_py3 import FailoverPolicies @@ -112,30 +101,13 @@ from ._models_py3 import PercentileMetricValue from ._models_py3 import PeriodicModeBackupPolicy from ._models_py3 import PeriodicModeProperties - from ._models_py3 import Permission from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointProperty from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkServiceConnectionStateProperty from ._models_py3 import ProxyResource from ._models_py3 import RegionForOnlineOffline - from ._models_py3 import RepairPostBody from ._models_py3 import Resource - from ._models_py3 import RestorableDatabaseAccountGetResult - from ._models_py3 import RestorableLocationResource - from ._models_py3 import RestorableMongodbCollectionGetResult - from ._models_py3 import RestorableMongodbCollectionPropertiesResource - from ._models_py3 import RestorableMongodbDatabaseGetResult - from ._models_py3 import RestorableMongodbDatabasePropertiesResource - from ._models_py3 import RestorableSqlContainerGetResult - from ._models_py3 import RestorableSqlContainerPropertiesResource - from ._models_py3 import RestorableSqlContainerPropertiesResourceContainer - from ._models_py3 import RestorableSqlDatabaseGetResult - from ._models_py3 import RestorableSqlDatabasePropertiesResource - from ._models_py3 import RestorableSqlDatabasePropertiesResourceDatabase - from ._models_py3 import RestoreParameters - from ._models_py3 import RestoreReqeustDatabaseAccountCreateUpdateProperties - from ._models_py3 import SeedNode from ._models_py3 import SpatialSpec from ._models_py3 import SqlContainerCreateUpdateParameters from ._models_py3 import SqlContainerGetPropertiesOptions @@ -147,10 +119,6 @@ from ._models_py3 import SqlDatabaseGetPropertiesResource from ._models_py3 import SqlDatabaseGetResults from ._models_py3 import SqlDatabaseResource - from ._models_py3 import SqlRoleAssignmentCreateUpdateParameters - from ._models_py3 import SqlRoleAssignmentGetResults - from ._models_py3 import SqlRoleDefinitionCreateUpdateParameters - from ._models_py3 import SqlRoleDefinitionGetResults from ._models_py3 import SqlStoredProcedureCreateUpdateParameters from ._models_py3 import SqlStoredProcedureGetPropertiesResource from ._models_py3 import SqlStoredProcedureGetResults @@ -163,7 +131,6 @@ from ._models_py3 import SqlUserDefinedFunctionGetPropertiesResource from ._models_py3 import SqlUserDefinedFunctionGetResults from ._models_py3 import SqlUserDefinedFunctionResource - from ._models_py3 import SystemData from ._models_py3 import TableCreateUpdateParameters from ._models_py3 import TableGetPropertiesOptions from ._models_py3 import TableGetPropertiesResource @@ -188,8 +155,6 @@ from ._models import AutoUpgradePolicyResource from ._models import AzureEntityResource from ._models import BackupPolicy - from ._models import BackupResource - from ._models import BackupResourceProperties from ._models import Capability from ._models import CassandraKeyspaceCreateUpdateParameters from ._models import CassandraKeyspaceGetPropertiesOptions @@ -203,12 +168,7 @@ from ._models import CassandraTableGetPropertiesResource from ._models import CassandraTableGetResults from ._models import CassandraTableResource - from ._models import Certificate from ._models import ClusterKey - from ._models import ClusterNodeStatus - from ._models import ClusterNodeStatusNodesItem - from ._models import ClusterResource - from ._models import ClusterResourceProperties from ._models import Column from ._models import CompositePath from ._models import ConflictResolutionPolicy @@ -219,18 +179,14 @@ from ._models import CreateUpdateOptions from ._models import DatabaseAccountConnectionString from ._models import DatabaseAccountCreateUpdateParameters - from ._models import DatabaseAccountCreateUpdateProperties from ._models import DatabaseAccountGetResults from ._models import DatabaseAccountListConnectionStringsResult from ._models import DatabaseAccountListKeysResult from ._models import DatabaseAccountListReadOnlyKeysResult from ._models import DatabaseAccountRegenerateKeyParameters from ._models import DatabaseAccountUpdateParameters - from ._models import DatabaseRestoreResource - from ._models import DataCenterResource - from ._models import DataCenterResourceProperties - from ._models import DefaultRequestDatabaseAccountCreateUpdateProperties from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponseUpdatedFormat, ErrorResponseUpdatedFormatException from ._models import ExcludedPath from ._models import ExtendedResourceProperties from ._models import FailoverPolicies @@ -282,30 +238,13 @@ from ._models import PercentileMetricValue from ._models import PeriodicModeBackupPolicy from ._models import PeriodicModeProperties - from ._models import Permission from ._models import PrivateEndpointConnection from ._models import PrivateEndpointProperty from ._models import PrivateLinkResource from ._models import PrivateLinkServiceConnectionStateProperty from ._models import ProxyResource from ._models import RegionForOnlineOffline - from ._models import RepairPostBody from ._models import Resource - from ._models import RestorableDatabaseAccountGetResult - from ._models import RestorableLocationResource - from ._models import RestorableMongodbCollectionGetResult - from ._models import RestorableMongodbCollectionPropertiesResource - from ._models import RestorableMongodbDatabaseGetResult - from ._models import RestorableMongodbDatabasePropertiesResource - from ._models import RestorableSqlContainerGetResult - from ._models import RestorableSqlContainerPropertiesResource - from ._models import RestorableSqlContainerPropertiesResourceContainer - from ._models import RestorableSqlDatabaseGetResult - from ._models import RestorableSqlDatabasePropertiesResource - from ._models import RestorableSqlDatabasePropertiesResourceDatabase - from ._models import RestoreParameters - from ._models import RestoreReqeustDatabaseAccountCreateUpdateProperties - from ._models import SeedNode from ._models import SpatialSpec from ._models import SqlContainerCreateUpdateParameters from ._models import SqlContainerGetPropertiesOptions @@ -317,10 +256,6 @@ from ._models import SqlDatabaseGetPropertiesResource from ._models import SqlDatabaseGetResults from ._models import SqlDatabaseResource - from ._models import SqlRoleAssignmentCreateUpdateParameters - from ._models import SqlRoleAssignmentGetResults - from ._models import SqlRoleDefinitionCreateUpdateParameters - from ._models import SqlRoleDefinitionGetResults from ._models import SqlStoredProcedureCreateUpdateParameters from ._models import SqlStoredProcedureGetPropertiesResource from ._models import SqlStoredProcedureGetResults @@ -333,7 +268,6 @@ from ._models import SqlUserDefinedFunctionGetPropertiesResource from ._models import SqlUserDefinedFunctionGetResults from ._models import SqlUserDefinedFunctionResource - from ._models import SystemData from ._models import TableCreateUpdateParameters from ._models import TableGetPropertiesOptions from ._models import TableGetPropertiesResource @@ -349,13 +283,9 @@ from ._models import UniqueKeyPolicy from ._models import Usage from ._models import VirtualNetworkRule -from ._paged_models import BackupResourcePaged from ._paged_models import CassandraKeyspaceGetResultsPaged from ._paged_models import CassandraTableGetResultsPaged -from ._paged_models import ClusterResourcePaged from ._paged_models import DatabaseAccountGetResultsPaged -from ._paged_models import DatabaseRestoreResourcePaged -from ._paged_models import DataCenterResourcePaged from ._paged_models import GremlinDatabaseGetResultsPaged from ._paged_models import GremlinGraphGetResultsPaged from ._paged_models import MetricDefinitionPaged @@ -369,15 +299,8 @@ from ._paged_models import PercentileMetricPaged from ._paged_models import PrivateEndpointConnectionPaged from ._paged_models import PrivateLinkResourcePaged -from ._paged_models import RestorableDatabaseAccountGetResultPaged -from ._paged_models import RestorableMongodbCollectionGetResultPaged -from ._paged_models import RestorableMongodbDatabaseGetResultPaged -from ._paged_models import RestorableSqlContainerGetResultPaged -from ._paged_models import RestorableSqlDatabaseGetResultPaged from ._paged_models import SqlContainerGetResultsPaged from ._paged_models import SqlDatabaseGetResultsPaged -from ._paged_models import SqlRoleAssignmentGetResultsPaged -from ._paged_models import SqlRoleDefinitionGetResultsPaged from ._paged_models import SqlStoredProcedureGetResultsPaged from ._paged_models import SqlTriggerGetResultsPaged from ._paged_models import SqlUserDefinedFunctionGetResultsPaged @@ -385,15 +308,13 @@ from ._paged_models import UsagePaged from ._cosmos_db_management_client_enums import ( DatabaseAccountKind, + ResourceIdentityType, DatabaseAccountOfferType, DefaultConsistencyLevel, ConnectorOffer, PublicNetworkAccess, ServerVersion, - CreateMode, - RestoreMode, NetworkAclBypass, - CreatedByType, IndexingMode, DataType, IndexKind, @@ -403,19 +324,10 @@ ConflictResolutionMode, TriggerType, TriggerOperation, - ResourceIdentityType, KeyKind, UnitType, PrimaryAggregationType, BackupPolicyType, - BackupStorageRedundancy, - ApiType, - RoleDefinitionType, - OperationType, - ManagedCassandraProvisioningState, - AuthenticationMethod, - NodeStatus, - NodeState, ) __all__ = [ @@ -427,8 +339,6 @@ 'AutoUpgradePolicyResource', 'AzureEntityResource', 'BackupPolicy', - 'BackupResource', - 'BackupResourceProperties', 'Capability', 'CassandraKeyspaceCreateUpdateParameters', 'CassandraKeyspaceGetPropertiesOptions', @@ -442,12 +352,7 @@ 'CassandraTableGetPropertiesResource', 'CassandraTableGetResults', 'CassandraTableResource', - 'Certificate', 'ClusterKey', - 'ClusterNodeStatus', - 'ClusterNodeStatusNodesItem', - 'ClusterResource', - 'ClusterResourceProperties', 'Column', 'CompositePath', 'ConflictResolutionPolicy', @@ -458,18 +363,14 @@ 'CreateUpdateOptions', 'DatabaseAccountConnectionString', 'DatabaseAccountCreateUpdateParameters', - 'DatabaseAccountCreateUpdateProperties', 'DatabaseAccountGetResults', 'DatabaseAccountListConnectionStringsResult', 'DatabaseAccountListKeysResult', 'DatabaseAccountListReadOnlyKeysResult', 'DatabaseAccountRegenerateKeyParameters', 'DatabaseAccountUpdateParameters', - 'DatabaseRestoreResource', - 'DataCenterResource', - 'DataCenterResourceProperties', - 'DefaultRequestDatabaseAccountCreateUpdateProperties', 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseUpdatedFormat', 'ErrorResponseUpdatedFormatException', 'ExcludedPath', 'ExtendedResourceProperties', 'FailoverPolicies', @@ -521,30 +422,13 @@ 'PercentileMetricValue', 'PeriodicModeBackupPolicy', 'PeriodicModeProperties', - 'Permission', 'PrivateEndpointConnection', 'PrivateEndpointProperty', 'PrivateLinkResource', 'PrivateLinkServiceConnectionStateProperty', 'ProxyResource', 'RegionForOnlineOffline', - 'RepairPostBody', 'Resource', - 'RestorableDatabaseAccountGetResult', - 'RestorableLocationResource', - 'RestorableMongodbCollectionGetResult', - 'RestorableMongodbCollectionPropertiesResource', - 'RestorableMongodbDatabaseGetResult', - 'RestorableMongodbDatabasePropertiesResource', - 'RestorableSqlContainerGetResult', - 'RestorableSqlContainerPropertiesResource', - 'RestorableSqlContainerPropertiesResourceContainer', - 'RestorableSqlDatabaseGetResult', - 'RestorableSqlDatabasePropertiesResource', - 'RestorableSqlDatabasePropertiesResourceDatabase', - 'RestoreParameters', - 'RestoreReqeustDatabaseAccountCreateUpdateProperties', - 'SeedNode', 'SpatialSpec', 'SqlContainerCreateUpdateParameters', 'SqlContainerGetPropertiesOptions', @@ -556,10 +440,6 @@ 'SqlDatabaseGetPropertiesResource', 'SqlDatabaseGetResults', 'SqlDatabaseResource', - 'SqlRoleAssignmentCreateUpdateParameters', - 'SqlRoleAssignmentGetResults', - 'SqlRoleDefinitionCreateUpdateParameters', - 'SqlRoleDefinitionGetResults', 'SqlStoredProcedureCreateUpdateParameters', 'SqlStoredProcedureGetPropertiesResource', 'SqlStoredProcedureGetResults', @@ -572,7 +452,6 @@ 'SqlUserDefinedFunctionGetPropertiesResource', 'SqlUserDefinedFunctionGetResults', 'SqlUserDefinedFunctionResource', - 'SystemData', 'TableCreateUpdateParameters', 'TableGetPropertiesOptions', 'TableGetPropertiesResource', @@ -601,8 +480,6 @@ 'SqlStoredProcedureGetResultsPaged', 'SqlUserDefinedFunctionGetResultsPaged', 'SqlTriggerGetResultsPaged', - 'SqlRoleDefinitionGetResultsPaged', - 'SqlRoleAssignmentGetResultsPaged', 'MongoDBDatabaseGetResultsPaged', 'MongoDBCollectionGetResultsPaged', 'TableGetResultsPaged', @@ -610,28 +487,17 @@ 'CassandraTableGetResultsPaged', 'GremlinDatabaseGetResultsPaged', 'GremlinGraphGetResultsPaged', - 'RestorableDatabaseAccountGetResultPaged', 'NotebookWorkspacePaged', - 'RestorableSqlDatabaseGetResultPaged', - 'RestorableSqlContainerGetResultPaged', - 'DatabaseRestoreResourcePaged', - 'RestorableMongodbDatabaseGetResultPaged', - 'RestorableMongodbCollectionGetResultPaged', - 'ClusterResourcePaged', - 'BackupResourcePaged', - 'DataCenterResourcePaged', 'PrivateLinkResourcePaged', 'PrivateEndpointConnectionPaged', 'DatabaseAccountKind', + 'ResourceIdentityType', 'DatabaseAccountOfferType', 'DefaultConsistencyLevel', 'ConnectorOffer', 'PublicNetworkAccess', 'ServerVersion', - 'CreateMode', - 'RestoreMode', 'NetworkAclBypass', - 'CreatedByType', 'IndexingMode', 'DataType', 'IndexKind', @@ -641,17 +507,8 @@ 'ConflictResolutionMode', 'TriggerType', 'TriggerOperation', - 'ResourceIdentityType', 'KeyKind', 'UnitType', 'PrimaryAggregationType', 'BackupPolicyType', - 'BackupStorageRedundancy', - 'ApiType', - 'RoleDefinitionType', - 'OperationType', - 'ManagedCassandraProvisioningState', - 'AuthenticationMethod', - 'NodeStatus', - 'NodeState', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py index 3f1aca9673de..cca39334a213 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py @@ -19,6 +19,14 @@ class DatabaseAccountKind(str, Enum): parse = "Parse" +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned,UserAssigned" + none = "None" + + class DatabaseAccountOfferType(str, Enum): standard = "Standard" @@ -51,31 +59,12 @@ class ServerVersion(str, Enum): four_full_stop_zero = "4.0" -class CreateMode(str, Enum): - - default = "Default" - restore = "Restore" - - -class RestoreMode(str, Enum): - - point_in_time = "PointInTime" - - class NetworkAclBypass(str, Enum): none = "None" azure_services = "AzureServices" -class CreatedByType(str, Enum): - - user = "User" - application = "Application" - managed_identity = "ManagedIdentity" - key = "Key" - - class IndexingMode(str, Enum): consistent = "consistent" @@ -142,14 +131,6 @@ class TriggerOperation(str, Enum): replace = "Replace" -class ResourceIdentityType(str, Enum): - - system_assigned = "SystemAssigned" - user_assigned = "UserAssigned" - system_assigned_user_assigned = "SystemAssigned,UserAssigned" - none = "None" - - class KeyKind(str, Enum): primary = "primary" @@ -183,65 +164,3 @@ class BackupPolicyType(str, Enum): periodic = "Periodic" continuous = "Continuous" - - -class BackupStorageRedundancy(str, Enum): - - geo = "Geo" - local = "Local" - zone = "Zone" - - -class ApiType(str, Enum): - - mongo_db = "MongoDB" - gremlin = "Gremlin" - cassandra = "Cassandra" - table = "Table" - sql = "Sql" - gremlin_v2 = "GremlinV2" - - -class RoleDefinitionType(str, Enum): - - built_in_role = "BuiltInRole" - custom_role = "CustomRole" - - -class OperationType(str, Enum): - - create = "Create" - replace = "Replace" - delete = "Delete" - system_operation = "SystemOperation" - - -class ManagedCassandraProvisioningState(str, Enum): - - creating = "Creating" - updating = "Updating" - deleting = "Deleting" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" - - -class AuthenticationMethod(str, Enum): - - none = "None" - cassandra = "Cassandra" - - -class NodeStatus(str, Enum): - - up = "Up" - down = "Down" - - -class NodeState(str, Enum): - - normal = "Normal" - leaving = "Leaving" - joining = "Joining" - moving = "Moving" - stopped = "Stopped" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py index 52fba1aa9d3f..a3dc011213a7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -81,8 +81,6 @@ class ARMResourceProperties(Model): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _validation = { @@ -97,7 +95,6 @@ class ARMResourceProperties(Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } def __init__(self, **kwargs): @@ -107,7 +104,6 @@ def __init__(self, **kwargs): self.type = None self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) class AutoscaleSettings(Model): @@ -289,94 +285,6 @@ def __init__(self, **kwargs): self.type = None -class ProxyResource(Resource): - """Proxy Resource. - - The resource model definition for a Azure Resource Manager proxy resource. - It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. E.g. - "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) - - -class BackupResource(ProxyResource): - """A restorable backup of a Cassandra cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. E.g. - "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - :vartype type: str - :param properties: - :type properties: ~azure.mgmt.cosmosdb.models.BackupResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceProperties'}, - } - - def __init__(self, **kwargs): - super(BackupResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class BackupResourceProperties(Model): - """BackupResourceProperties. - - :param timestamp: The time this backup was taken, formatted like - 2021-01-21T17:35:21 - :type timestamp: datetime - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(BackupResourceProperties, self).__init__(**kwargs) - self.timestamp = kwargs.get('timestamp', None) - - class Capability(Model): """Cosmos DB capability object. @@ -414,8 +322,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra keyspace :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource @@ -437,7 +343,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -549,8 +454,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource @@ -571,7 +474,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, } @@ -664,8 +566,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra table :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource :param options: A key-value pair of options to be applied for the request. @@ -686,7 +586,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -788,8 +687,6 @@ class CassandraTableGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource @@ -810,7 +707,6 @@ class CassandraTableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, } @@ -855,49 +751,13 @@ def __init__(self, **kwargs): self.analytical_storage_ttl = kwargs.get('analytical_storage_ttl', None) -class Certificate(Model): - """Certificate. - - :param pem: PEM formatted public key. - :type pem: str - """ - - _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Certificate, self).__init__(**kwargs) - self.pem = kwargs.get('pem', None) - - class CloudError(Model): - """An error response from the service. - - :param error: - :type error: ~azure.mgmt.cosmosdb.models.ErrorResponse + """CloudError. """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, **kwargs): - super(CloudError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - class ClusterKey(Model): """Cosmos DB Cassandra table cluster key. @@ -920,247 +780,6 @@ def __init__(self, **kwargs): self.order_by = kwargs.get('order_by', None) -class ClusterNodeStatus(Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). - - :param nodes: Information about nodes in the cluster (corresponds to what - is returned from nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] - """ - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, - } - - def __init__(self, **kwargs): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = kwargs.get('nodes', None) - - -class ClusterNodeStatusNodesItem(Model): - """ClusterNodeStatusNodesItem. - - :param datacenter: The Cassandra data center this node resides in. - :type datacenter: str - :param status: Indicates whether the node is functioning or not. Possible - values include: 'Up', 'Down' - :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus - :param state: The state of the node in relation to the cluster. Possible - values include: 'Normal', 'Leaving', 'Joining', 'Moving', 'Stopped' - :type state: str or ~azure.mgmt.cosmosdb.models.NodeState - :param address: The node's URL. - :type address: str - :param load: The amount of file system data in the data directory (e.g., - 47.66 KB), excluding all content in the snapshots subdirectories. Because - all SSTable data files are included, any data that is not cleaned up (such - as TTL-expired cell or tombstoned data) is counted. - :type load: str - :param tokens: List of tokens. - :type tokens: list[str] - :param owns: The percentage of the data owned by the node per datacenter - times the replication factor (e.g., 33.3, or null if the data is not - available). For example, a node can own 33% of the ring, but shows 100% if - the replication factor is 3. For non-system keyspaces, the endpoint - percentage ownership information is shown. - :type owns: float - :param host_id: The network ID of the node. - :type host_id: str - :param rack: The rack this node is part of. - :type rack: str - """ - - _attribute_map = { - 'datacenter': {'key': 'datacenter', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'load': {'key': 'load', 'type': 'str'}, - 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'owns': {'key': 'owns', 'type': 'float'}, - 'host_id': {'key': 'hostId', 'type': 'str'}, - 'rack': {'key': 'rack', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) - self.datacenter = kwargs.get('datacenter', None) - self.status = kwargs.get('status', None) - self.state = kwargs.get('state', None) - self.address = kwargs.get('address', None) - self.load = kwargs.get('load', None) - self.tokens = kwargs.get('tokens', None) - self.owns = kwargs.get('owns', None) - self.host_id = kwargs.get('host_id', None) - self.rack = kwargs.get('rack', None) - - -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, - } - - def __init__(self, **kwargs): - super(ClusterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ClusterResourceProperties(Model): - """Properties of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param provisioning_state: Possible values include: 'Creating', - 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - :type provisioning_state: str or - ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param restore_from_backup_id: To create an empty cluster, omit this field - or set it to null. To restore a backup into a new cluster, set this field - to the resource id of the backup. - :type restore_from_backup_id: str - :param delegated_management_subnet_id: Resource id of a subnet that this - cluster's management service should have its network interface attached - to. The subnet must be routable to all subnets that will be delegated to - data centers. The resource id must be of the form - '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/' - :type delegated_management_subnet_id: str - :param cassandra_version: Which version of Cassandra should this cluster - converge to running (e.g., 3.11). When updated, the cluster may take some - time to migrate to the new version. - :type cassandra_version: str - :param cluster_name_override: If you need to set the clusterName property - in cassandra.yaml to something besides the resource name of the cluster, - set the value to use on this property. - :type cluster_name_override: str - :param authentication_method: Which authentication method Cassandra should - use to authenticate clients. 'None' turns off authentication, so should - not be used except in emergencies. 'Cassandra' is the default password - based authentication. The default is 'Cassandra'. Possible values include: - 'None', 'Cassandra' - :type authentication_method: str or - ~azure.mgmt.cosmosdb.models.AuthenticationMethod - :param initial_cassandra_admin_password: Initial password for clients - connecting as admin to the cluster. Should be changed after cluster - creation. Returns null on GET. This field only applies when the - authenticationMethod field is 'Cassandra'. - :type initial_cassandra_admin_password: str - :param hours_between_backups: Number of hours to wait between taking a - backup of the cluster. To disable backups, set this property to 0. - :type hours_between_backups: int - :param prometheus_endpoint: Hostname or IP address where the Prometheus - endpoint containing data about the managed Cassandra nodes can be reached. - :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode - :param repair_enabled: Should automatic repairs run on this cluster? If - omitted, this is true, and should stay true unless you are running a - hybrid cluster where you are already doing your own repairs. - :type repair_enabled: bool - :param client_certificates: List of TLS certificates used to authorize - clients connecting to the cluster. All connections are TLS encrypted - whether clientCertificates is set or not, but if clientCertificates is - set, the managed Cassandra cluster will reject all connections not bearing - a TLS client certificate that can be validated from one or more of the - public certificates in this property. - :type client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_gossip_certificates: List of TLS certificates used to - authorize gossip from unmanaged data centers. The TLS certificates of all - nodes in unmanaged data centers must be verifiable using one of the - certificates provided in this property. - :type external_gossip_certificates: - list[~azure.mgmt.cosmosdb.models.Certificate] - :ivar gossip_certificates: List of TLS certificates that unmanaged nodes - must trust for gossip with managed nodes. All managed nodes will present - TLS client certificates that are verifiable using one of the certificates - provided in this property. - :vartype gossip_certificates: - list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_seed_nodes: List of IP addresses of seed nodes in - unmanaged data centers. These will be added to the seed node lists of all - managed nodes. - :type external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :ivar seed_nodes: List of IP addresses of seed nodes in the managed data - centers. These should be added to the seed node lists of all unmanaged - nodes. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - """ - - _validation = { - 'gossip_certificates': {'readonly': True}, - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, - 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, - 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, - 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, - 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, - 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, - 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, - 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, - 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, - 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, - 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - } - - def __init__(self, **kwargs): - super(ClusterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.restore_from_backup_id = kwargs.get('restore_from_backup_id', None) - self.delegated_management_subnet_id = kwargs.get('delegated_management_subnet_id', None) - self.cassandra_version = kwargs.get('cassandra_version', None) - self.cluster_name_override = kwargs.get('cluster_name_override', None) - self.authentication_method = kwargs.get('authentication_method', None) - self.initial_cassandra_admin_password = kwargs.get('initial_cassandra_admin_password', None) - self.hours_between_backups = kwargs.get('hours_between_backups', None) - self.prometheus_endpoint = kwargs.get('prometheus_endpoint', None) - self.repair_enabled = kwargs.get('repair_enabled', None) - self.client_certificates = kwargs.get('client_certificates', None) - self.external_gossip_certificates = kwargs.get('external_gossip_certificates', None) - self.gossip_certificates = None - self.external_seed_nodes = kwargs.get('external_seed_nodes', None) - self.seed_nodes = None - - class Column(Model): """Cosmos DB Cassandra table column. @@ -1451,53 +1070,12 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param properties: Required. - :type properties: - ~azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DatabaseAccountCreateUpdateProperties'}, - } - - def __init__(self, **kwargs): - super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) - self.kind = kwargs.get('kind', "GlobalDocumentDB") - self.properties = kwargs.get('properties', None) - - -class DatabaseAccountCreateUpdateProperties(Model): - """Properties to create and update Azure Cosmos DB database accounts. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties, - RestoreReqeustDatabaseAccountCreateUpdateProperties - - 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. - + :param identity: + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy @@ -1537,6 +1115,11 @@ class DatabaseAccountCreateUpdateProperties(Model): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used + in features like customer managed keys. The default identity needs to be + explicitly set by the users. It can be "FirstPartyIdentity", + "SystemAssignedIdentity" and more. + :type default_identity: str :param public_network_access: Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' :type public_network_access: str or @@ -1561,51 +1144,56 @@ class DatabaseAccountCreateUpdateProperties(Model): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param create_mode: Required. Constant filled by server. - :type create_mode: str """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'locations': {'required': True}, 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'NetworkAclBypass'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, } - _subtype_map = { - 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties', 'Restore': 'RestoreReqeustDatabaseAccountCreateUpdateProperties'} + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + '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'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'NetworkAclBypass'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, } database_account_offer_type = "Standard" def __init__(self, **kwargs): - super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.consistency_policy = kwargs.get('consistency_policy', None) - self.locations = kwargs.get('locations', None) + super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) + self.kind = kwargs.get('kind', "GlobalDocumentDB") + self.identity = kwargs.get('identity', None) + self.consistency_policy = kwargs.get('consistency_policy', None) + self.locations = kwargs.get('locations', None) self.ip_rules = kwargs.get('ip_rules', None) self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) @@ -1616,6 +1204,7 @@ def __init__(self, **kwargs): self.connector_offer = kwargs.get('connector_offer', None) self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.default_identity = kwargs.get('default_identity', None) self.public_network_access = kwargs.get('public_network_access', None) self.enable_free_tier = kwargs.get('enable_free_tier', None) self.api_properties = kwargs.get('api_properties', None) @@ -1624,7 +1213,6 @@ def __init__(self, **kwargs): self.cors = kwargs.get('cors', None) self.network_acl_bypass = kwargs.get('network_acl_bypass', None) self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.create_mode = None class DatabaseAccountGetResults(ARMResourceProperties): @@ -1644,12 +1232,12 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param provisioning_state: :type provisioning_state: str :ivar document_endpoint: The connection endpoint for the Cosmos DB @@ -1710,6 +1298,11 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used + in features like customer managed keys. The default identity needs to be + explicitly set by the users. It can be "FirstPartyIdentity", + "SystemAssignedIdentity" and more. + :type default_identity: str :param public_network_access: Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' :type public_network_access: str or @@ -1721,14 +1314,6 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. :type enable_analytical_storage: bool - :ivar instance_id: A unique identifier assigned to the database account - :vartype instance_id: str - :param create_mode: Enum to indicate the mode of account creation. - Possible values include: 'Default', 'Restore'. Default value: "Default" . - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param restore_parameters: Parameters to indicate the information about - the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy @@ -1741,8 +1326,6 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData """ _validation = { @@ -1756,8 +1339,6 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'locations': {'readonly': True}, 'failover_policies': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'system_data': {'readonly': True}, } _attribute_map = { @@ -1766,8 +1347,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, @@ -1787,23 +1368,21 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'NetworkAclBypass'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): super(DatabaseAccountGetResults, self).__init__(**kwargs) self.kind = kwargs.get('kind', "GlobalDocumentDB") + self.identity = kwargs.get('identity', None) self.provisioning_state = kwargs.get('provisioning_state', None) self.document_endpoint = None self.database_account_offer_type = None @@ -1823,18 +1402,15 @@ def __init__(self, **kwargs): self.connector_offer = kwargs.get('connector_offer', None) self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.default_identity = kwargs.get('default_identity', None) self.public_network_access = kwargs.get('public_network_access', None) self.enable_free_tier = kwargs.get('enable_free_tier', None) self.api_properties = kwargs.get('api_properties', None) self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) - self.instance_id = None - self.create_mode = kwargs.get('create_mode', "Default") - self.restore_parameters = kwargs.get('restore_parameters', None) self.backup_policy = kwargs.get('backup_policy', None) self.cors = kwargs.get('cors', None) self.network_acl_bypass = kwargs.get('network_acl_bypass', None) self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.system_data = None class DatabaseAccountListConnectionStringsResult(Model): @@ -1956,6 +1532,8 @@ class DatabaseAccountUpdateParameters(Model): :param location: The location of the resource group to which the resource belongs. :type location: str + :param identity: + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy @@ -1992,6 +1570,11 @@ class DatabaseAccountUpdateParameters(Model): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used + in features like customer managed keys. The default identity needs to be + explicitly set by the users. It can be "FirstPartyIdentity", + "SystemAssignedIdentity" and more. + :type default_identity: str :param public_network_access: Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' :type public_network_access: str or @@ -2016,13 +1599,12 @@ class DatabaseAccountUpdateParameters(Model): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'locations': {'key': 'properties.locations', 'type': '[Location]'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, @@ -2035,6 +1617,7 @@ class DatabaseAccountUpdateParameters(Model): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, @@ -2043,13 +1626,13 @@ class DatabaseAccountUpdateParameters(Model): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'NetworkAclBypass'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } def __init__(self, **kwargs): super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) self.consistency_policy = kwargs.get('consistency_policy', None) self.locations = kwargs.get('locations', None) self.ip_rules = kwargs.get('ip_rules', None) @@ -2062,6 +1645,7 @@ def __init__(self, **kwargs): self.connector_offer = kwargs.get('connector_offer', None) self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.default_identity = kwargs.get('default_identity', None) self.public_network_access = kwargs.get('public_network_access', None) self.enable_free_tier = kwargs.get('enable_free_tier', None) self.api_properties = kwargs.get('api_properties', None) @@ -2070,261 +1654,58 @@ def __init__(self, **kwargs): self.cors = kwargs.get('cors', None) self.network_acl_bypass = kwargs.get('network_acl_bypass', None) self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.identity = kwargs.get('identity', None) - - -class DatabaseRestoreResource(Model): - """Specific Databases to restore. - - :param database_name: The name of the database available for restore. - :type database_name: str - :param collection_names: The names of the collections available for - restore. - :type collection_names: list[str] - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(DatabaseRestoreResource, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.collection_names = kwargs.get('collection_names', None) - - -class DataCenterResource(ProxyResource): - """A managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. E.g. - "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - :vartype type: str - :param properties: Properties of a managed Cassandra data center. - :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, - } - - def __init__(self, **kwargs): - super(DataCenterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) -class DataCenterResourceProperties(Model): - """Properties of a managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when - sending a request. +class ErrorResponse(Model): + """Error Response. - :param provisioning_state: Possible values include: 'Creating', - 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - :type provisioning_state: str or - ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param data_center_location: The region this data center should be created - in. - :type data_center_location: str - :param delegated_subnet_id: Resource id of a subnet the nodes in this data - center should have their network interfaces connected to. The subnet must - be in the same region specified in 'dataCenterLocation' and must be able - to route to the subnet specified in the cluster's - 'delegatedManagementSubnetId' property. This resource id will be of the - form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'. - :type delegated_subnet_id: str - :param node_count: The number of nodes the data center should have. This - is the desired number. After it is set, it may take some time for the data - center to be scaled to match. To monitor the number of nodes and their - status, use the fetchNodeStatus method on the cluster. - :type node_count: int - :ivar seed_nodes: IP addresses for seed nodes in this data center. This is - for reference. Generally you will want to use the seedNodes property on - the cluster, which aggregates the seed nodes from all data centers in the - cluster. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :param base64_encoded_cassandra_yaml_fragment: A fragment of a - cassandra.yaml configuration file to be included in the cassandra.yaml for - all nodes in this data center. The fragment should be Base64 encoded, and - only a subset of keys are allowed. - :type base64_encoded_cassandra_yaml_fragment: str + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str """ - _validation = { - 'seed_nodes': {'readonly': True}, - } - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): - super(DataCenterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.data_center_location = kwargs.get('data_center_location', None) - self.delegated_subnet_id = kwargs.get('delegated_subnet_id', None) - self.node_count = kwargs.get('node_count', None) - self.seed_nodes = None - self.base64_encoded_cassandra_yaml_fragment = kwargs.get('base64_encoded_cassandra_yaml_fragment', None) - - -class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties for non-restore Azure Cosmos DB database account requests. + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) - 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. +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to - enable/disable Virtual Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: 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. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured - for the Cosmos DB account. - :type virtual_network_rules: - list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :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 - :param disable_key_based_metadata_write_access: Disable write operations - on metadata resources (databases, containers, throughput) via account keys - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault - :type key_vault_key_uri: str - :param public_network_access: Whether requests from Public Network are - allowed. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only - for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable - storage analytics. - :type enable_analytical_storage: bool - :param backup_policy: The object representing the policy for taking - backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass - firewall checks. Possible values include: 'None', 'AzureServices' - :type network_acl_bypass: str or - ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the - Resource Ids for Network Acl Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param create_mode: Required. Constant filled by server. - :type create_mode: str + :param deserialize: A deserializer + :param response: Server response to be deserialized. """ - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'NetworkAclBypass'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } + def __init__(self, deserialize, response, *args): - def __init__(self, **kwargs): - super(DefaultRequestDatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.create_mode = 'Default' + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) -class ErrorResponse(Model): - """Error Response. +class ErrorResponseUpdatedFormat(Model): + """An error response from the service. - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str + :param error: + :type error: ~azure.mgmt.cosmosdb.models.ErrorResponse """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + super(ErrorResponseUpdatedFormat, self).__init__(**kwargs) + self.error = kwargs.get('error', None) -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. +class ErrorResponseUpdatedFormatException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponseUpdatedFormat'. :param deserialize: A deserializer :param response: Server response to be deserialized. @@ -2332,7 +1713,7 @@ class ErrorResponseException(HttpOperationError): def __init__(self, deserialize, response, *args): - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + super(ErrorResponseUpdatedFormatException, self).__init__(deserialize, response, 'ErrorResponseUpdatedFormat', *args) class ExcludedPath(Model): @@ -2466,8 +1847,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin database :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource :param options: A key-value pair of options to be applied for the request. @@ -2488,7 +1867,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -2578,8 +1956,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource @@ -2600,7 +1976,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, } @@ -2652,8 +2027,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin graph :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource :param options: A key-value pair of options to be applied for the request. @@ -2674,7 +2047,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -2790,8 +2162,6 @@ class GremlinGraphGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource @@ -2812,7 +2182,6 @@ class GremlinGraphGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, } @@ -3328,8 +2697,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB collection :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource @@ -3351,7 +2718,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -3454,8 +2820,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource @@ -3476,7 +2840,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, } @@ -3541,8 +2904,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB database :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :param options: A key-value pair of options to be applied for the request. @@ -3563,7 +2924,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -3653,8 +3013,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource @@ -3675,7 +3033,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, } @@ -4231,10 +3588,6 @@ class PeriodicModeProperties(Model): :param backup_retention_interval_in_hours: An integer representing the time (in hours) that each backup is retained :type backup_retention_interval_in_hours: int - :param backup_storage_redundancy: Enum to indicate type of backup - residency. Possible values include: 'Geo', 'Local', 'Zone' - :type backup_storage_redundancy: str or - ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy """ _validation = { @@ -4245,34 +3598,47 @@ class PeriodicModeProperties(Model): _attribute_map = { 'backup_interval_in_minutes': {'key': 'backupIntervalInMinutes', 'type': 'int'}, 'backup_retention_interval_in_hours': {'key': 'backupRetentionIntervalInHours', 'type': 'int'}, - 'backup_storage_redundancy': {'key': 'backupStorageRedundancy', 'type': 'str'}, } def __init__(self, **kwargs): super(PeriodicModeProperties, self).__init__(**kwargs) self.backup_interval_in_minutes = kwargs.get('backup_interval_in_minutes', None) self.backup_retention_interval_in_hours = kwargs.get('backup_retention_interval_in_hours', None) - self.backup_storage_redundancy = kwargs.get('backup_storage_redundancy', None) -class Permission(Model): - """The set of data plane operations permitted through this Role Definition. +class ProxyResource(Resource): + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param data_actions: An array of data actions that are allowed. - :type data_actions: list[str] - :param not_data_actions: An array of data actions that are denied. - :type not_data_actions: list[str] + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'data_actions': {'key': 'dataActions', 'type': '[str]'}, - 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): - super(Permission, self).__init__(**kwargs) - self.data_actions = kwargs.get('data_actions', None) - self.not_data_actions = kwargs.get('not_data_actions', None) + super(ProxyResource, self).__init__(**kwargs) class PrivateEndpointConnection(ProxyResource): @@ -4343,882 +3709,103 @@ def __init__(self, **kwargs): class PrivateLinkResource(ARMProxyResource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - :ivar required_zone_names: The private link resource required zone names. - :vartype required_zone_names: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - 'required_zone_names': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkResource, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None - - -class PrivateLinkServiceConnectionStateProperty(Model): - """Connection State of the Private Endpoint Connection. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param status: The private link service connection status. - :type status: str - :param description: The private link service connection description. - :type description: str - :ivar actions_required: Any action that is required beyond basic workflow - (approve/ reject/ disconnect) - :vartype actions_required: str - """ - - _validation = { - 'actions_required': {'readonly': True}, - } - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = None - - -class RegionForOnlineOffline(Model): - """Cosmos DB region to online or offline. - - All required parameters must be populated in order to send to Azure. - - :param region: Required. Cosmos DB region, with spaces between words and - each word capitalized. - :type region: str - """ - - _validation = { - 'region': {'required': True}, - } - - _attribute_map = { - 'region': {'key': 'region', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegionForOnlineOffline, self).__init__(**kwargs) - self.region = kwargs.get('region', None) - - -class RepairPostBody(Model): - """Specification of the keyspaces and tables to run repair on. - - All required parameters must be populated in order to send to Azure. - - :param keyspace: Required. The name of the keyspace that repair should be - run on. - :type keyspace: str - :param tables: List of tables in the keyspace to repair. If omitted, - repair all tables in the keyspace. - :type tables: list[str] - """ - - _validation = { - 'keyspace': {'required': True}, - } - - _attribute_map = { - 'keyspace': {'key': 'keyspace', 'type': 'str'}, - 'tables': {'key': 'tables', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(RepairPostBody, self).__init__(**kwargs) - self.keyspace = kwargs.get('keyspace', None) - self.tables = kwargs.get('tables', None) - - -class RestorableDatabaseAccountGetResult(Model): - """A Azure Cosmos DB restorable database account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param account_name: The name of the global database account - :type account_name: str - :param creation_time: The creation time of the restorable database account - (ISO-8601 format). - :type creation_time: datetime - :param deletion_time: The time at which the restorable database account - has been deleted (ISO-8601 format). - :type deletion_time: datetime - :ivar api_type: The API type of the restorable database account. Possible - values include: 'MongoDB', 'Gremlin', 'Cassandra', 'Table', 'Sql', - 'GremlinV2' - :vartype api_type: str or ~azure.mgmt.cosmosdb.models.ApiType - :ivar restorable_locations: List of regions where the of the database - account can be restored from. - :vartype restorable_locations: - list[~azure.mgmt.cosmosdb.models.RestorableLocationResource] - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - """ - - _validation = { - 'api_type': {'readonly': True}, - 'restorable_locations': {'readonly': True}, - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'deletion_time': {'key': 'properties.deletionTime', 'type': 'iso-8601'}, - 'api_type': {'key': 'properties.apiType', 'type': 'str'}, - 'restorable_locations': {'key': 'properties.restorableLocations', 'type': '[RestorableLocationResource]'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableDatabaseAccountGetResult, self).__init__(**kwargs) - self.account_name = kwargs.get('account_name', None) - self.creation_time = kwargs.get('creation_time', None) - self.deletion_time = kwargs.get('deletion_time', None) - self.api_type = None - self.restorable_locations = None - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - - -class RestorableLocationResource(Model): - """Properties of the regional restorable account. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar location_name: The location of the regional restorable account. - :vartype location_name: str - :ivar regional_database_account_instance_id: The instance id of the - regional restorable account. - :vartype regional_database_account_instance_id: str - :ivar creation_time: The creation time of the regional restorable database - account (ISO-8601 format). - :vartype creation_time: datetime - :ivar deletion_time: The time at which the regional restorable database - account has been deleted (ISO-8601 format). - :vartype deletion_time: datetime - """ - - _validation = { - 'location_name': {'readonly': True}, - 'regional_database_account_instance_id': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'deletion_time': {'readonly': True}, - } - - _attribute_map = { - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'regional_database_account_instance_id': {'key': 'regionalDatabaseAccountInstanceId', 'type': 'str'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'deletion_time': {'key': 'deletionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(RestorableLocationResource, self).__init__(**kwargs) - self.location_name = None - self.regional_database_account_instance_id = None - self.creation_time = None - self.deletion_time = None - - -class RestorableMongodbCollectionGetResult(Model): - """An Azure Cosmos DB MongoDB collection event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB MongoDB collection - event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionPropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableMongodbCollectionPropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableMongodbCollectionGetResult, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.id = None - self.name = None - self.type = None - - -class RestorableMongodbCollectionPropertiesResource(Model): - """The resource of an Azure Cosmos DB MongoDB collection event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this collection event. - Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The time when this collection event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of this MongoDB collection. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of this MongoDB collection. - :vartype owner_resource_id: str - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableMongodbCollectionPropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - - -class RestorableMongodbDatabaseGetResult(Model): - """An Azure Cosmos DB MongoDB database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB MongoDB database event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableMongodbDatabasePropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableMongodbDatabasePropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableMongodbDatabaseGetResult, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.id = None - self.name = None - self.type = None - - -class RestorableMongodbDatabasePropertiesResource(Model): - """The resource of an Azure Cosmos DB MongoDB database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this database event. Possible - values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The time when this database event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of this MongoDB database. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of this MongoDB database. - :vartype owner_resource_id: str - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableMongodbDatabasePropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - - -class RestorableSqlContainerGetResult(Model): - """An Azure Cosmos DB SQL container event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB SQL container event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableSqlContainerPropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableSqlContainerPropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableSqlContainerGetResult, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.id = None - self.name = None - self.type = None - - -class RestorableSqlContainerPropertiesResource(Model): - """The resource of an Azure Cosmos DB SQL container event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this container event. Possible - values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The when this container event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of this SQL container. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of this SQL container. - :vartype owner_resource_id: str - :param container: Cosmos DB SQL container resource object - :type container: - ~azure.mgmt.cosmosdb.models.RestorableSqlContainerPropertiesResourceContainer - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'RestorableSqlContainerPropertiesResourceContainer'}, - } - - def __init__(self, **kwargs): - super(RestorableSqlContainerPropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - self.container = kwargs.get('container', None) - - -class RestorableSqlContainerPropertiesResourceContainer(Model): - """Cosmos DB SQL container resource object. - - 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. - - :param id: Required. Name of the Cosmos DB SQL container - :type id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the - container - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - container. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param analytical_storage_ttl: Analytical TTL. - :type analytical_storage_ttl: long - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: float - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str - :ivar _self: A system generated property that specifies the addressable - path of the container resource. - :vartype _self: str - """ - - _validation = { - 'id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, - '_self': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, - '_rid': {'key': '_rid', 'type': 'str'}, - '_ts': {'key': '_ts', 'type': 'float'}, - '_etag': {'key': '_etag', 'type': 'str'}, - '_self': {'key': '_self', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableSqlContainerPropertiesResourceContainer, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.indexing_policy = kwargs.get('indexing_policy', None) - self.partition_key = kwargs.get('partition_key', None) - self.default_ttl = kwargs.get('default_ttl', None) - self.unique_key_policy = kwargs.get('unique_key_policy', None) - self.conflict_resolution_policy = kwargs.get('conflict_resolution_policy', None) - self.analytical_storage_ttl = kwargs.get('analytical_storage_ttl', None) - self._rid = None - self._ts = None - self._etag = None - self._self = None - - -class RestorableSqlDatabaseGetResult(Model): - """An Azure Cosmos DB SQL database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB SQL database event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableSqlDatabasePropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableSqlDatabasePropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableSqlDatabaseGetResult, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.id = None - self.name = None - self.type = None - - -class RestorableSqlDatabasePropertiesResource(Model): - """The resource of an Azure Cosmos DB SQL database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this database event. Possible - values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The time when this database event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of the SQL database. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of the SQL database. - :vartype owner_resource_id: str - :param database: Cosmos DB SQL database resource object - :type database: - ~azure.mgmt.cosmosdb.models.RestorableSqlDatabasePropertiesResourceDatabase - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - 'database': {'key': 'database', 'type': 'RestorableSqlDatabasePropertiesResourceDatabase'}, - } - - def __init__(self, **kwargs): - super(RestorableSqlDatabasePropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - self.database = kwargs.get('database', None) - - -class RestorableSqlDatabasePropertiesResourceDatabase(Model): - """Cosmos DB SQL database resource object. - - 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. - - :param id: Required. Name of the Cosmos DB SQL database - :type id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: float - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str - :ivar _colls: A system generated property that specified the addressable - path of the collections resource. - :vartype _colls: str - :ivar _users: A system generated property that specifies the addressable - path of the users resource. - :vartype _users: str - :ivar _self: A system generated property that specifies the addressable - path of the database resource. - :vartype _self: str - """ - - _validation = { - 'id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, - '_colls': {'readonly': True}, - '_users': {'readonly': True}, - '_self': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - '_rid': {'key': '_rid', 'type': 'str'}, - '_ts': {'key': '_ts', 'type': 'float'}, - '_etag': {'key': '_etag', 'type': 'str'}, - '_colls': {'key': '_colls', 'type': 'str'}, - '_users': {'key': '_users', 'type': 'str'}, - '_self': {'key': '_self', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RestorableSqlDatabasePropertiesResourceDatabase, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self._rid = None - self._ts = None - self._etag = None - self._colls = None - self._users = None - self._self = None - + """A private link resource. -class RestoreParameters(Model): - """Parameters to indicate the information about the restore. + Variables are only populated by the server, and will be ignored when + sending a request. - :param restore_mode: Describes the mode of the restore. Possible values - include: 'PointInTime' - :type restore_mode: str or ~azure.mgmt.cosmosdb.models.RestoreMode - :param restore_source: The id of the restorable database account from - which the restore has to be initiated. For example: - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} - :type restore_source: str - :param restore_timestamp_in_utc: Time to which the account has to be - restored (ISO-8601 format). - :type restore_timestamp_in_utc: datetime - :param databases_to_restore: List of specific databases available for - restore. - :type databases_to_restore: - list[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :ivar required_zone_names: The private link resource required zone names. + :vartype required_zone_names: list[str] """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + } + _attribute_map = { - 'restore_mode': {'key': 'restoreMode', 'type': 'str'}, - 'restore_source': {'key': 'restoreSource', 'type': 'str'}, - 'restore_timestamp_in_utc': {'key': 'restoreTimestampInUtc', 'type': 'iso-8601'}, - 'databases_to_restore': {'key': 'databasesToRestore', 'type': '[DatabaseRestoreResource]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__(self, **kwargs): - super(RestoreParameters, self).__init__(**kwargs) - self.restore_mode = kwargs.get('restore_mode', None) - self.restore_source = kwargs.get('restore_source', None) - self.restore_timestamp_in_utc = kwargs.get('restore_timestamp_in_utc', None) - self.databases_to_restore = kwargs.get('databases_to_restore', None) + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None -class RestoreReqeustDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties to restore Azure Cosmos DB database account. +class PrivateLinkServiceConnectionStateProperty(Model): + """Connection State of the Private Endpoint Connection. 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. - - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to - enable/disable Virtual Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: 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. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured - for the Cosmos DB account. - :type virtual_network_rules: - list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :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 - :param disable_key_based_metadata_write_access: Disable write operations - on metadata resources (databases, containers, throughput) via account keys - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault - :type key_vault_key_uri: str - :param public_network_access: Whether requests from Public Network are - allowed. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only - for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable - storage analytics. - :type enable_analytical_storage: bool - :param backup_policy: The object representing the policy for taking - backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass - firewall checks. Possible values include: 'None', 'AzureServices' - :type network_acl_bypass: str or - ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the - Resource Ids for Network Acl Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param restore_parameters: Parameters to indicate the information about - the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param status: The private link service connection status. + :type status: str + :param description: The private link service connection description. + :type description: str + :ivar actions_required: Any action that is required beyond basic workflow + (approve/ reject/ disconnect) + :vartype actions_required: str """ _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, + 'actions_required': {'readonly': True}, } _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'NetworkAclBypass'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } def __init__(self, **kwargs): - super(RestoreReqeustDatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.restore_parameters = kwargs.get('restore_parameters', None) - self.create_mode = 'Restore' + super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = None -class SeedNode(Model): - """SeedNode. +class RegionForOnlineOffline(Model): + """Cosmos DB region to online or offline. + + All required parameters must be populated in order to send to Azure. - :param ip_address: IP address of this seed node. - :type ip_address: str + :param region: Required. Cosmos DB region, with spaces between words and + each word capitalized. + :type region: str """ + _validation = { + 'region': {'required': True}, + } + _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, } def __init__(self, **kwargs): - super(SeedNode, self).__init__(**kwargs) - self.ip_address = kwargs.get('ip_address', None) + super(RegionForOnlineOffline, self).__init__(**kwargs) + self.region = kwargs.get('region', None) class SpatialSpec(Model): @@ -5261,8 +3848,6 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a container :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource :param options: A key-value pair of options to be applied for the request. @@ -5283,7 +3868,6 @@ class SqlContainerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -5404,8 +3988,6 @@ class SqlContainerGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource @@ -5426,7 +4008,6 @@ class SqlContainerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, } @@ -5509,8 +4090,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a SQL database :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource :param options: A key-value pair of options to be applied for the request. @@ -5531,7 +4110,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -5631,8 +4209,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource @@ -5652,7 +4228,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, } @@ -5685,176 +4260,6 @@ def __init__(self, **kwargs): self.id = kwargs.get('id', None) -class SqlRoleAssignmentCreateUpdateParameters(Model): - """Parameters to create and update an Azure Cosmos DB SQL Role Assignment. - - :param role_definition_id: The unique identifier for the associated Role - Definition. - :type role_definition_id: str - :param scope: The data plane resource path for which access is being - granted through this Role Assignment. - :type scope: str - :param principal_id: The unique identifier for the associated AAD - principal in the AAD graph to which access is being granted through this - Role Assignment. Tenant ID for the principal is inferred using the tenant - associated with the subscription. - :type principal_id: str - """ - - _attribute_map = { - 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlRoleAssignmentCreateUpdateParameters, self).__init__(**kwargs) - self.role_definition_id = kwargs.get('role_definition_id', None) - self.scope = kwargs.get('scope', None) - self.principal_id = kwargs.get('principal_id', None) - - -class SqlRoleAssignmentGetResults(ARMProxyResource): - """An Azure Cosmos DB Role Assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param role_definition_id: The unique identifier for the associated Role - Definition. - :type role_definition_id: str - :param scope: The data plane resource path for which access is being - granted through this Role Assignment. - :type scope: str - :param principal_id: The unique identifier for the associated AAD - principal in the AAD graph to which access is being granted through this - Role Assignment. Tenant ID for the principal is inferred using the tenant - associated with the subscription. - :type principal_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SqlRoleAssignmentGetResults, self).__init__(**kwargs) - self.role_definition_id = kwargs.get('role_definition_id', None) - self.scope = kwargs.get('scope', None) - self.principal_id = kwargs.get('principal_id', None) - - -class SqlRoleDefinitionCreateUpdateParameters(Model): - """Parameters to create and update an Azure Cosmos DB SQL Role Definition. - - :param role_name: A user-friendly name for the Role Definition. Must be - unique for the database account. - :type role_name: str - :param type: Indicates whether the Role Definition was built-in or user - created. Possible values include: 'BuiltInRole', 'CustomRole' - :type type: str or ~azure.mgmt.cosmosdb.models.RoleDefinitionType - :param assignable_scopes: A set of fully qualified Scopes at or below - which Role Assignments may be created using this Role Definition. This - will allow application of this Role Definition on the entire database - account or any underlying Database / Collection. Must have at least one - element. Scopes higher than Database account are not enforceable as - assignable Scopes. Note that resources referenced in assignable Scopes - need not exist. - :type assignable_scopes: list[str] - :param permissions: The set of operations allowed through this Role - Definition. - :type permissions: list[~azure.mgmt.cosmosdb.models.Permission] - """ - - _attribute_map = { - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'RoleDefinitionType'}, - 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, - 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, - } - - def __init__(self, **kwargs): - super(SqlRoleDefinitionCreateUpdateParameters, self).__init__(**kwargs) - self.role_name = kwargs.get('role_name', None) - self.type = kwargs.get('type', None) - self.assignable_scopes = kwargs.get('assignable_scopes', None) - self.permissions = kwargs.get('permissions', None) - - -class SqlRoleDefinitionGetResults(ARMProxyResource): - """An Azure Cosmos DB SQL Role Definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param role_name: A user-friendly name for the Role Definition. Must be - unique for the database account. - :type role_name: str - :param sql_role_definition_get_results_type: Indicates whether the Role - Definition was built-in or user created. Possible values include: - 'BuiltInRole', 'CustomRole' - :type sql_role_definition_get_results_type: str or - ~azure.mgmt.cosmosdb.models.RoleDefinitionType - :param assignable_scopes: A set of fully qualified Scopes at or below - which Role Assignments may be created using this Role Definition. This - will allow application of this Role Definition on the entire database - account or any underlying Database / Collection. Must have at least one - element. Scopes higher than Database account are not enforceable as - assignable Scopes. Note that resources referenced in assignable Scopes - need not exist. - :type assignable_scopes: list[str] - :param permissions: The set of operations allowed through this Role - Definition. - :type permissions: list[~azure.mgmt.cosmosdb.models.Permission] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'sql_role_definition_get_results_type': {'key': 'properties.type', 'type': 'RoleDefinitionType'}, - 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, - 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, - } - - def __init__(self, **kwargs): - super(SqlRoleDefinitionGetResults, self).__init__(**kwargs) - self.role_name = kwargs.get('role_name', None) - self.sql_role_definition_get_results_type = kwargs.get('sql_role_definition_get_results_type', None) - self.assignable_scopes = kwargs.get('assignable_scopes', None) - self.permissions = kwargs.get('permissions', None) - - class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB storedProcedure. @@ -5874,8 +4279,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a storedProcedure :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :param options: A key-value pair of options to be applied for the request. @@ -5896,7 +4299,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -5970,8 +4372,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource @@ -5989,7 +4389,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, } @@ -6043,8 +4442,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a trigger :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource :param options: A key-value pair of options to be applied for the request. @@ -6065,7 +4462,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -6150,8 +4546,6 @@ class SqlTriggerGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource @@ -6169,7 +4563,6 @@ class SqlTriggerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, } @@ -6234,8 +4627,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a userDefinedFunction :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource @@ -6257,7 +4648,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -6331,8 +4721,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource @@ -6350,7 +4738,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, } @@ -6385,46 +4772,6 @@ def __init__(self, **kwargs): self.body = kwargs.get('body', None) -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or ~azure.mgmt.cosmosdb.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.cosmosdb.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC) - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - class TableCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB Table. @@ -6444,8 +4791,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Table :type resource: ~azure.mgmt.cosmosdb.models.TableResource :param options: A key-value pair of options to be applied for the request. @@ -6466,7 +4811,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } @@ -6556,8 +4900,6 @@ class TableGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource :param options: @@ -6576,7 +4918,6 @@ class TableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, } @@ -6705,8 +5046,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource @@ -6724,7 +5063,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, } @@ -6793,8 +5131,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a resource throughput :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource @@ -6813,7 +5149,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, } diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py index 46a05925baa4..5b3ad9b7ebd7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py @@ -81,8 +81,6 @@ class ARMResourceProperties(Model): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _validation = { @@ -97,17 +95,15 @@ class ARMResourceProperties(Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: super(ARMResourceProperties, self).__init__(**kwargs) self.id = None self.name = None self.type = None self.location = location self.tags = tags - self.identity = identity class AutoscaleSettings(Model): @@ -289,94 +285,6 @@ def __init__(self, **kwargs) -> None: self.type = None -class ProxyResource(Resource): - """Proxy Resource. - - The resource model definition for a Azure Resource Manager proxy resource. - It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. E.g. - "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) - - -class BackupResource(ProxyResource): - """A restorable backup of a Cassandra cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. E.g. - "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - :vartype type: str - :param properties: - :type properties: ~azure.mgmt.cosmosdb.models.BackupResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BackupResourceProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(BackupResource, self).__init__(**kwargs) - self.properties = properties - - -class BackupResourceProperties(Model): - """BackupResourceProperties. - - :param timestamp: The time this backup was taken, formatted like - 2021-01-21T17:35:21 - :type timestamp: datetime - """ - - _attribute_map = { - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - } - - def __init__(self, *, timestamp=None, **kwargs) -> None: - super(BackupResourceProperties, self).__init__(**kwargs) - self.timestamp = timestamp - - class Capability(Model): """Cosmos DB capability object. @@ -414,8 +322,6 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra keyspace :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceResource @@ -437,13 +343,12 @@ class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(CassandraKeyspaceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(CassandraKeyspaceCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -549,8 +454,6 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource @@ -571,13 +474,12 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -664,8 +566,6 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Cassandra table :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableResource :param options: A key-value pair of options to be applied for the request. @@ -686,13 +586,12 @@ class CassandraTableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(CassandraTableCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(CassandraTableCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -788,8 +687,6 @@ class CassandraTableGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource @@ -810,13 +707,12 @@ class CassandraTableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(CassandraTableGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(CassandraTableGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -855,49 +751,13 @@ def __init__(self, *, id: str, default_ttl: int=None, schema=None, analytical_st self.analytical_storage_ttl = analytical_storage_ttl -class Certificate(Model): - """Certificate. - - :param pem: PEM formatted public key. - :type pem: str - """ - - _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, - } - - def __init__(self, *, pem: str=None, **kwargs) -> None: - super(Certificate, self).__init__(**kwargs) - self.pem = pem - - class CloudError(Model): - """An error response from the service. - - :param error: - :type error: ~azure.mgmt.cosmosdb.models.ErrorResponse + """CloudError. """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, *, error=None, **kwargs) -> None: - super(CloudError, self).__init__(**kwargs) - self.error = error - - -class CloudErrorException(HttpOperationError): - """Server responsed with exception of type: 'CloudError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) - class ClusterKey(Model): """Cosmos DB Cassandra table cluster key. @@ -920,247 +780,6 @@ def __init__(self, *, name: str=None, order_by: str=None, **kwargs) -> None: self.order_by = order_by -class ClusterNodeStatus(Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). - - :param nodes: Information about nodes in the cluster (corresponds to what - is returned from nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] - """ - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, - } - - def __init__(self, *, nodes=None, **kwargs) -> None: - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = nodes - - -class ClusterNodeStatusNodesItem(Model): - """ClusterNodeStatusNodesItem. - - :param datacenter: The Cassandra data center this node resides in. - :type datacenter: str - :param status: Indicates whether the node is functioning or not. Possible - values include: 'Up', 'Down' - :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus - :param state: The state of the node in relation to the cluster. Possible - values include: 'Normal', 'Leaving', 'Joining', 'Moving', 'Stopped' - :type state: str or ~azure.mgmt.cosmosdb.models.NodeState - :param address: The node's URL. - :type address: str - :param load: The amount of file system data in the data directory (e.g., - 47.66 KB), excluding all content in the snapshots subdirectories. Because - all SSTable data files are included, any data that is not cleaned up (such - as TTL-expired cell or tombstoned data) is counted. - :type load: str - :param tokens: List of tokens. - :type tokens: list[str] - :param owns: The percentage of the data owned by the node per datacenter - times the replication factor (e.g., 33.3, or null if the data is not - available). For example, a node can own 33% of the ring, but shows 100% if - the replication factor is 3. For non-system keyspaces, the endpoint - percentage ownership information is shown. - :type owns: float - :param host_id: The network ID of the node. - :type host_id: str - :param rack: The rack this node is part of. - :type rack: str - """ - - _attribute_map = { - 'datacenter': {'key': 'datacenter', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'load': {'key': 'load', 'type': 'str'}, - 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'owns': {'key': 'owns', 'type': 'float'}, - 'host_id': {'key': 'hostId', 'type': 'str'}, - 'rack': {'key': 'rack', 'type': 'str'}, - } - - def __init__(self, *, datacenter: str=None, status=None, state=None, address: str=None, load: str=None, tokens=None, owns: float=None, host_id: str=None, rack: str=None, **kwargs) -> None: - super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) - self.datacenter = datacenter - self.status = status - self.state = state - self.address = address - self.load = load - self.tokens = tokens - self.owns = owns - self.host_id = host_id - self.rack = rack - - -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, properties=None, **kwargs) -> None: - super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.properties = properties - - -class ClusterResourceProperties(Model): - """Properties of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param provisioning_state: Possible values include: 'Creating', - 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - :type provisioning_state: str or - ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param restore_from_backup_id: To create an empty cluster, omit this field - or set it to null. To restore a backup into a new cluster, set this field - to the resource id of the backup. - :type restore_from_backup_id: str - :param delegated_management_subnet_id: Resource id of a subnet that this - cluster's management service should have its network interface attached - to. The subnet must be routable to all subnets that will be delegated to - data centers. The resource id must be of the form - '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/' - :type delegated_management_subnet_id: str - :param cassandra_version: Which version of Cassandra should this cluster - converge to running (e.g., 3.11). When updated, the cluster may take some - time to migrate to the new version. - :type cassandra_version: str - :param cluster_name_override: If you need to set the clusterName property - in cassandra.yaml to something besides the resource name of the cluster, - set the value to use on this property. - :type cluster_name_override: str - :param authentication_method: Which authentication method Cassandra should - use to authenticate clients. 'None' turns off authentication, so should - not be used except in emergencies. 'Cassandra' is the default password - based authentication. The default is 'Cassandra'. Possible values include: - 'None', 'Cassandra' - :type authentication_method: str or - ~azure.mgmt.cosmosdb.models.AuthenticationMethod - :param initial_cassandra_admin_password: Initial password for clients - connecting as admin to the cluster. Should be changed after cluster - creation. Returns null on GET. This field only applies when the - authenticationMethod field is 'Cassandra'. - :type initial_cassandra_admin_password: str - :param hours_between_backups: Number of hours to wait between taking a - backup of the cluster. To disable backups, set this property to 0. - :type hours_between_backups: int - :param prometheus_endpoint: Hostname or IP address where the Prometheus - endpoint containing data about the managed Cassandra nodes can be reached. - :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode - :param repair_enabled: Should automatic repairs run on this cluster? If - omitted, this is true, and should stay true unless you are running a - hybrid cluster where you are already doing your own repairs. - :type repair_enabled: bool - :param client_certificates: List of TLS certificates used to authorize - clients connecting to the cluster. All connections are TLS encrypted - whether clientCertificates is set or not, but if clientCertificates is - set, the managed Cassandra cluster will reject all connections not bearing - a TLS client certificate that can be validated from one or more of the - public certificates in this property. - :type client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_gossip_certificates: List of TLS certificates used to - authorize gossip from unmanaged data centers. The TLS certificates of all - nodes in unmanaged data centers must be verifiable using one of the - certificates provided in this property. - :type external_gossip_certificates: - list[~azure.mgmt.cosmosdb.models.Certificate] - :ivar gossip_certificates: List of TLS certificates that unmanaged nodes - must trust for gossip with managed nodes. All managed nodes will present - TLS client certificates that are verifiable using one of the certificates - provided in this property. - :vartype gossip_certificates: - list[~azure.mgmt.cosmosdb.models.Certificate] - :param external_seed_nodes: List of IP addresses of seed nodes in - unmanaged data centers. These will be added to the seed node lists of all - managed nodes. - :type external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :ivar seed_nodes: List of IP addresses of seed nodes in the managed data - centers. These should be added to the seed node lists of all unmanaged - nodes. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - """ - - _validation = { - 'gossip_certificates': {'readonly': True}, - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, - 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, - 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, - 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, - 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, - 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, - 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, - 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, - 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, - 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, - 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - } - - def __init__(self, *, provisioning_state=None, restore_from_backup_id: str=None, delegated_management_subnet_id: str=None, cassandra_version: str=None, cluster_name_override: str=None, authentication_method=None, initial_cassandra_admin_password: str=None, hours_between_backups: int=None, prometheus_endpoint=None, repair_enabled: bool=None, client_certificates=None, external_gossip_certificates=None, external_seed_nodes=None, **kwargs) -> None: - super(ClusterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.restore_from_backup_id = restore_from_backup_id - self.delegated_management_subnet_id = delegated_management_subnet_id - self.cassandra_version = cassandra_version - self.cluster_name_override = cluster_name_override - self.authentication_method = authentication_method - self.initial_cassandra_admin_password = initial_cassandra_admin_password - self.hours_between_backups = hours_between_backups - self.prometheus_endpoint = prometheus_endpoint - self.repair_enabled = repair_enabled - self.client_certificates = client_certificates - self.external_gossip_certificates = external_gossip_certificates - self.gossip_certificates = None - self.external_seed_nodes = external_seed_nodes - self.seed_nodes = None - - class Column(Model): """Cosmos DB Cassandra table column. @@ -1451,53 +1070,12 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param properties: Required. - :type properties: - ~azure.mgmt.cosmosdb.models.DatabaseAccountCreateUpdateProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DatabaseAccountCreateUpdateProperties'}, - } - - def __init__(self, *, properties, location: str=None, tags=None, identity=None, kind="GlobalDocumentDB", **kwargs) -> None: - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.kind = kind - self.properties = properties - - -class DatabaseAccountCreateUpdateProperties(Model): - """Properties to create and update Azure Cosmos DB database accounts. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties, - RestoreReqeustDatabaseAccountCreateUpdateProperties - - 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. - + :param identity: + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy @@ -1537,6 +1115,11 @@ class DatabaseAccountCreateUpdateProperties(Model): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used + in features like customer managed keys. The default identity needs to be + explicitly set by the users. It can be "FirstPartyIdentity", + "SystemAssignedIdentity" and more. + :type default_identity: str :param public_network_access: Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' :type public_network_access: str or @@ -1561,49 +1144,54 @@ class DatabaseAccountCreateUpdateProperties(Model): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param create_mode: Required. Constant filled by server. - :type create_mode: str """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'locations': {'required': True}, 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'NetworkAclBypass'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, } - _subtype_map = { - 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties', 'Restore': 'RestoreReqeustDatabaseAccountCreateUpdateProperties'} + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + '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'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'NetworkAclBypass'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, } database_account_offer_type = "Standard" - def __init__(self, *, locations, consistency_policy=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, **kwargs) -> None: - super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) + def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", identity=None, consistency_policy=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, default_identity: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, **kwargs) -> None: + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.kind = kind + self.identity = identity self.consistency_policy = consistency_policy self.locations = locations self.ip_rules = ip_rules @@ -1616,6 +1204,7 @@ def __init__(self, *, locations, consistency_policy=None, ip_rules=None, is_virt self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity self.public_network_access = public_network_access self.enable_free_tier = enable_free_tier self.api_properties = api_properties @@ -1624,7 +1213,6 @@ def __init__(self, *, locations, consistency_policy=None, ip_rules=None, is_virt self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.create_mode = None class DatabaseAccountGetResults(ARMResourceProperties): @@ -1644,12 +1232,12 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: 'GlobalDocumentDB', 'MongoDB', 'Parse'. Default value: "GlobalDocumentDB" . :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param provisioning_state: :type provisioning_state: str :ivar document_endpoint: The connection endpoint for the Cosmos DB @@ -1710,6 +1298,11 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used + in features like customer managed keys. The default identity needs to be + explicitly set by the users. It can be "FirstPartyIdentity", + "SystemAssignedIdentity" and more. + :type default_identity: str :param public_network_access: Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' :type public_network_access: str or @@ -1721,14 +1314,6 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. :type enable_analytical_storage: bool - :ivar instance_id: A unique identifier assigned to the database account - :vartype instance_id: str - :param create_mode: Enum to indicate the mode of account creation. - Possible values include: 'Default', 'Restore'. Default value: "Default" . - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param restore_parameters: Parameters to indicate the information about - the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy @@ -1741,8 +1326,6 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData """ _validation = { @@ -1756,8 +1339,6 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'locations': {'readonly': True}, 'failover_policies': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'readonly': True}, - 'system_data': {'readonly': True}, } _attribute_map = { @@ -1766,8 +1347,8 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'DatabaseAccountOfferType'}, @@ -1787,23 +1368,21 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'NetworkAclBypass'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, create_mode="Default", restore_parameters=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, **kwargs) -> None: - super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", identity=None, provisioning_state: str=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, default_identity: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, **kwargs) -> None: + super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind + self.identity = identity self.provisioning_state = provisioning_state self.document_endpoint = None self.database_account_offer_type = None @@ -1823,18 +1402,15 @@ def __init__(self, *, location: str=None, tags=None, identity=None, kind="Global self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity self.public_network_access = public_network_access self.enable_free_tier = enable_free_tier self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage - self.instance_id = None - self.create_mode = create_mode - self.restore_parameters = restore_parameters self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.system_data = None class DatabaseAccountListConnectionStringsResult(Model): @@ -1956,6 +1532,8 @@ class DatabaseAccountUpdateParameters(Model): :param location: The location of the resource group to which the resource belongs. :type location: str + :param identity: + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy @@ -1992,6 +1570,11 @@ class DatabaseAccountUpdateParameters(Model): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used + in features like customer managed keys. The default identity needs to be + explicitly set by the users. It can be "FirstPartyIdentity", + "SystemAssignedIdentity" and more. + :type default_identity: str :param public_network_access: Whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled' :type public_network_access: str or @@ -2016,13 +1599,12 @@ class DatabaseAccountUpdateParameters(Model): :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'locations': {'key': 'properties.locations', 'type': '[Location]'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, @@ -2035,6 +1617,7 @@ class DatabaseAccountUpdateParameters(Model): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, @@ -2043,13 +1626,13 @@ class DatabaseAccountUpdateParameters(Model): 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'NetworkAclBypass'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } - def __init__(self, *, tags=None, location: str=None, consistency_policy=None, locations=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, identity=None, **kwargs) -> None: + def __init__(self, *, tags=None, location: str=None, identity=None, consistency_policy=None, locations=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, default_identity: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, **kwargs) -> None: super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.location = location + self.identity = identity self.consistency_policy = consistency_policy self.locations = locations self.ip_rules = ip_rules @@ -2062,6 +1645,7 @@ def __init__(self, *, tags=None, location: str=None, consistency_policy=None, lo self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity self.public_network_access = public_network_access self.enable_free_tier = enable_free_tier self.api_properties = api_properties @@ -2070,237 +1654,6 @@ def __init__(self, *, tags=None, location: str=None, consistency_policy=None, lo self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.identity = identity - - -class DatabaseRestoreResource(Model): - """Specific Databases to restore. - - :param database_name: The name of the database available for restore. - :type database_name: str - :param collection_names: The names of the collections available for - restore. - :type collection_names: list[str] - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, - } - - def __init__(self, *, database_name: str=None, collection_names=None, **kwargs) -> None: - super(DatabaseRestoreResource, self).__init__(**kwargs) - self.database_name = database_name - self.collection_names = collection_names - - -class DataCenterResource(ProxyResource): - """A managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. E.g. - "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - :vartype type: str - :param properties: Properties of a managed Cassandra data center. - :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(DataCenterResource, self).__init__(**kwargs) - self.properties = properties - - -class DataCenterResourceProperties(Model): - """Properties of a managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param provisioning_state: Possible values include: 'Creating', - 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - :type provisioning_state: str or - ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param data_center_location: The region this data center should be created - in. - :type data_center_location: str - :param delegated_subnet_id: Resource id of a subnet the nodes in this data - center should have their network interfaces connected to. The subnet must - be in the same region specified in 'dataCenterLocation' and must be able - to route to the subnet specified in the cluster's - 'delegatedManagementSubnetId' property. This resource id will be of the - form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'. - :type delegated_subnet_id: str - :param node_count: The number of nodes the data center should have. This - is the desired number. After it is set, it may take some time for the data - center to be scaled to match. To monitor the number of nodes and their - status, use the fetchNodeStatus method on the cluster. - :type node_count: int - :ivar seed_nodes: IP addresses for seed nodes in this data center. This is - for reference. Generally you will want to use the seedNodes property on - the cluster, which aggregates the seed nodes from all data centers in the - cluster. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :param base64_encoded_cassandra_yaml_fragment: A fragment of a - cassandra.yaml configuration file to be included in the cassandra.yaml for - all nodes in this data center. The fragment should be Base64 encoded, and - only a subset of keys are allowed. - :type base64_encoded_cassandra_yaml_fragment: str - """ - - _validation = { - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, - } - - def __init__(self, *, provisioning_state=None, data_center_location: str=None, delegated_subnet_id: str=None, node_count: int=None, base64_encoded_cassandra_yaml_fragment: str=None, **kwargs) -> None: - super(DataCenterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.data_center_location = data_center_location - self.delegated_subnet_id = delegated_subnet_id - self.node_count = node_count - self.seed_nodes = None - self.base64_encoded_cassandra_yaml_fragment = base64_encoded_cassandra_yaml_fragment - - -class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties for non-restore Azure Cosmos DB database account requests. - - 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. - - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to - enable/disable Virtual Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: 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. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured - for the Cosmos DB account. - :type virtual_network_rules: - list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :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 - :param disable_key_based_metadata_write_access: Disable write operations - on metadata resources (databases, containers, throughput) via account keys - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault - :type key_vault_key_uri: str - :param public_network_access: Whether requests from Public Network are - allowed. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only - for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable - storage analytics. - :type enable_analytical_storage: bool - :param backup_policy: The object representing the policy for taking - backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass - firewall checks. Possible values include: 'None', 'AzureServices' - :type network_acl_bypass: str or - ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the - Resource Ids for Network Acl Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param create_mode: Required. Constant filled by server. - :type create_mode: str - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'NetworkAclBypass'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - } - - def __init__(self, *, locations, consistency_policy=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, **kwargs) -> None: - super(DefaultRequestDatabaseAccountCreateUpdateProperties, self).__init__(consistency_policy=consistency_policy, locations=locations, ip_rules=ip_rules, is_virtual_network_filter_enabled=is_virtual_network_filter_enabled, enable_automatic_failover=enable_automatic_failover, capabilities=capabilities, virtual_network_rules=virtual_network_rules, enable_multiple_write_locations=enable_multiple_write_locations, enable_cassandra_connector=enable_cassandra_connector, connector_offer=connector_offer, disable_key_based_metadata_write_access=disable_key_based_metadata_write_access, key_vault_key_uri=key_vault_key_uri, public_network_access=public_network_access, enable_free_tier=enable_free_tier, api_properties=api_properties, enable_analytical_storage=enable_analytical_storage, backup_policy=backup_policy, cors=cors, network_acl_bypass=network_acl_bypass, network_acl_bypass_resource_ids=network_acl_bypass_resource_ids, **kwargs) - self.create_mode = 'Default' class ErrorResponse(Model): @@ -2335,6 +1688,34 @@ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) +class ErrorResponseUpdatedFormat(Model): + """An error response from the service. + + :param error: + :type error: ~azure.mgmt.cosmosdb.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponseUpdatedFormat, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseUpdatedFormatException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponseUpdatedFormat'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseUpdatedFormatException, self).__init__(deserialize, response, 'ErrorResponseUpdatedFormat', *args) + + class ExcludedPath(Model): """ExcludedPath. @@ -2466,8 +1847,6 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin database :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseResource :param options: A key-value pair of options to be applied for the request. @@ -2488,13 +1867,12 @@ class GremlinDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(GremlinDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(GremlinDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -2578,8 +1956,6 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource @@ -2600,13 +1976,12 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -2652,8 +2027,6 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Gremlin graph :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphResource :param options: A key-value pair of options to be applied for the request. @@ -2674,13 +2047,12 @@ class GremlinGraphCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(GremlinGraphCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(GremlinGraphCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -2790,8 +2162,6 @@ class GremlinGraphGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource @@ -2812,13 +2182,12 @@ class GremlinGraphGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -3328,8 +2697,6 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB collection :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionResource @@ -3351,13 +2718,12 @@ class MongoDBCollectionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(MongoDBCollectionCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(MongoDBCollectionCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -3454,8 +2820,6 @@ class MongoDBCollectionGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource @@ -3476,13 +2840,12 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -3541,8 +2904,6 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a MongoDB database :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseResource :param options: A key-value pair of options to be applied for the request. @@ -3563,13 +2924,12 @@ class MongoDBDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(MongoDBDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(MongoDBDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -3653,8 +3013,6 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource @@ -3675,13 +3033,12 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -4231,10 +3588,6 @@ class PeriodicModeProperties(Model): :param backup_retention_interval_in_hours: An integer representing the time (in hours) that each backup is retained :type backup_retention_interval_in_hours: int - :param backup_storage_redundancy: Enum to indicate type of backup - residency. Possible values include: 'Geo', 'Local', 'Zone' - :type backup_storage_redundancy: str or - ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy """ _validation = { @@ -4245,34 +3598,47 @@ class PeriodicModeProperties(Model): _attribute_map = { 'backup_interval_in_minutes': {'key': 'backupIntervalInMinutes', 'type': 'int'}, 'backup_retention_interval_in_hours': {'key': 'backupRetentionIntervalInHours', 'type': 'int'}, - 'backup_storage_redundancy': {'key': 'backupStorageRedundancy', 'type': 'str'}, } - def __init__(self, *, backup_interval_in_minutes: int=None, backup_retention_interval_in_hours: int=None, backup_storage_redundancy=None, **kwargs) -> None: + def __init__(self, *, backup_interval_in_minutes: int=None, backup_retention_interval_in_hours: int=None, **kwargs) -> None: super(PeriodicModeProperties, self).__init__(**kwargs) self.backup_interval_in_minutes = backup_interval_in_minutes self.backup_retention_interval_in_hours = backup_retention_interval_in_hours - self.backup_storage_redundancy = backup_storage_redundancy -class Permission(Model): - """The set of data plane operations permitted through this Role Definition. +class ProxyResource(Resource): + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when + sending a request. - :param data_actions: An array of data actions that are allowed. - :type data_actions: list[str] - :param not_data_actions: An array of data actions that are denied. - :type not_data_actions: list[str] + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'data_actions': {'key': 'dataActions', 'type': '[str]'}, - 'not_data_actions': {'key': 'notDataActions', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, data_actions=None, not_data_actions=None, **kwargs) -> None: - super(Permission, self).__init__(**kwargs) - self.data_actions = data_actions - self.not_data_actions = not_data_actions + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) class PrivateEndpointConnection(ProxyResource): @@ -4442,56 +3808,35 @@ def __init__(self, *, region: str, **kwargs) -> None: self.region = region -class RepairPostBody(Model): - """Specification of the keyspaces and tables to run repair on. - - All required parameters must be populated in order to send to Azure. +class SpatialSpec(Model): + """SpatialSpec. - :param keyspace: Required. The name of the keyspace that repair should be - run on. - :type keyspace: str - :param tables: List of tables in the keyspace to repair. If omitted, - repair all tables in the keyspace. - :type tables: list[str] + :param path: The path for which the indexing behavior applies to. Index + paths typically start with root and end with wildcard (/path/*) + :type path: str + :param types: List of path's spatial type + :type types: list[str or ~azure.mgmt.cosmosdb.models.SpatialType] """ - _validation = { - 'keyspace': {'required': True}, - } - _attribute_map = { - 'keyspace': {'key': 'keyspace', 'type': 'str'}, - 'tables': {'key': 'tables', 'type': '[str]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'types': {'key': 'types', 'type': '[str]'}, } - def __init__(self, *, keyspace: str, tables=None, **kwargs) -> None: - super(RepairPostBody, self).__init__(**kwargs) - self.keyspace = keyspace - self.tables = tables + def __init__(self, *, path: str=None, types=None, **kwargs) -> None: + super(SpatialSpec, self).__init__(**kwargs) + self.path = path + self.types = types -class RestorableDatabaseAccountGetResult(Model): - """A Azure Cosmos DB restorable database account. +class SqlContainerCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB container. Variables are only populated by the server, and will be ignored when sending a request. - :param account_name: The name of the global database account - :type account_name: str - :param creation_time: The creation time of the restorable database account - (ISO-8601 format). - :type creation_time: datetime - :param deletion_time: The time at which the restorable database account - has been deleted (ISO-8601 format). - :type deletion_time: datetime - :ivar api_type: The API type of the restorable database account. Possible - values include: 'MongoDB', 'Gremlin', 'Cassandra', 'Table', 'Sql', - 'GremlinV2' - :vartype api_type: str or ~azure.mgmt.cosmosdb.models.ApiType - :ivar restorable_locations: List of regions where the of the database - account can be restored from. - :vartype restorable_locations: - list[~azure.mgmt.cosmosdb.models.RestorableLocationResource] + All required parameters must be populated in order to send to Azure. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -4501,801 +3846,40 @@ class RestorableDatabaseAccountGetResult(Model): :param location: The location of the resource group to which the resource belongs. :type location: str + :param tags: + :type tags: dict[str, str] + :param resource: Required. The standard JSON format of a container + :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource + :param options: A key-value pair of options to be applied for the request. + This corresponds to the headers sent with the request. + :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions """ _validation = { - 'api_type': {'readonly': True}, - 'restorable_locations': {'readonly': True}, 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'resource': {'required': True}, } _attribute_map = { - 'account_name': {'key': 'properties.accountName', 'type': 'str'}, - 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, - 'deletion_time': {'key': 'properties.deletionTime', 'type': 'iso-8601'}, - 'api_type': {'key': 'properties.apiType', 'type': 'str'}, - 'restorable_locations': {'key': 'properties.restorableLocations', 'type': '[RestorableLocationResource]'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, + 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, account_name: str=None, creation_time=None, deletion_time=None, location: str=None, **kwargs) -> None: - super(RestorableDatabaseAccountGetResult, self).__init__(**kwargs) - self.account_name = account_name - self.creation_time = creation_time - self.deletion_time = deletion_time - self.api_type = None - self.restorable_locations = None - self.id = None - self.name = None - self.type = None - self.location = location - - -class RestorableLocationResource(Model): - """Properties of the regional restorable account. - - Variables are only populated by the server, and will be ignored when - sending a request. + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(SqlContainerCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.resource = resource + self.options = options - :ivar location_name: The location of the regional restorable account. - :vartype location_name: str - :ivar regional_database_account_instance_id: The instance id of the - regional restorable account. - :vartype regional_database_account_instance_id: str - :ivar creation_time: The creation time of the regional restorable database - account (ISO-8601 format). - :vartype creation_time: datetime - :ivar deletion_time: The time at which the regional restorable database - account has been deleted (ISO-8601 format). - :vartype deletion_time: datetime - """ - _validation = { - 'location_name': {'readonly': True}, - 'regional_database_account_instance_id': {'readonly': True}, - 'creation_time': {'readonly': True}, - 'deletion_time': {'readonly': True}, - } - - _attribute_map = { - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'regional_database_account_instance_id': {'key': 'regionalDatabaseAccountInstanceId', 'type': 'str'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'deletion_time': {'key': 'deletionTime', 'type': 'iso-8601'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableLocationResource, self).__init__(**kwargs) - self.location_name = None - self.regional_database_account_instance_id = None - self.creation_time = None - self.deletion_time = None - - -class RestorableMongodbCollectionGetResult(Model): - """An Azure Cosmos DB MongoDB collection event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB MongoDB collection - event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionPropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableMongodbCollectionPropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, resource=None, **kwargs) -> None: - super(RestorableMongodbCollectionGetResult, self).__init__(**kwargs) - self.resource = resource - self.id = None - self.name = None - self.type = None - - -class RestorableMongodbCollectionPropertiesResource(Model): - """The resource of an Azure Cosmos DB MongoDB collection event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this collection event. - Possible values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The time when this collection event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of this MongoDB collection. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of this MongoDB collection. - :vartype owner_resource_id: str - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableMongodbCollectionPropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - - -class RestorableMongodbDatabaseGetResult(Model): - """An Azure Cosmos DB MongoDB database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB MongoDB database event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableMongodbDatabasePropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableMongodbDatabasePropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, resource=None, **kwargs) -> None: - super(RestorableMongodbDatabaseGetResult, self).__init__(**kwargs) - self.resource = resource - self.id = None - self.name = None - self.type = None - - -class RestorableMongodbDatabasePropertiesResource(Model): - """The resource of an Azure Cosmos DB MongoDB database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this database event. Possible - values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The time when this database event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of this MongoDB database. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of this MongoDB database. - :vartype owner_resource_id: str - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RestorableMongodbDatabasePropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - - -class RestorableSqlContainerGetResult(Model): - """An Azure Cosmos DB SQL container event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB SQL container event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableSqlContainerPropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableSqlContainerPropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, resource=None, **kwargs) -> None: - super(RestorableSqlContainerGetResult, self).__init__(**kwargs) - self.resource = resource - self.id = None - self.name = None - self.type = None - - -class RestorableSqlContainerPropertiesResource(Model): - """The resource of an Azure Cosmos DB SQL container event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this container event. Possible - values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The when this container event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of this SQL container. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of this SQL container. - :vartype owner_resource_id: str - :param container: Cosmos DB SQL container resource object - :type container: - ~azure.mgmt.cosmosdb.models.RestorableSqlContainerPropertiesResourceContainer - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'RestorableSqlContainerPropertiesResourceContainer'}, - } - - def __init__(self, *, container=None, **kwargs) -> None: - super(RestorableSqlContainerPropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - self.container = container - - -class RestorableSqlContainerPropertiesResourceContainer(Model): - """Cosmos DB SQL container resource object. - - 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. - - :param id: Required. Name of the Cosmos DB SQL container - :type id: str - :param indexing_policy: The configuration of the indexing policy. By - default, the indexing is automatic for all document paths within the - container - :type indexing_policy: ~azure.mgmt.cosmosdb.models.IndexingPolicy - :param partition_key: The configuration of the partition key to be used - for partitioning data into multiple partitions - :type partition_key: ~azure.mgmt.cosmosdb.models.ContainerPartitionKey - :param default_ttl: Default time to live - :type default_ttl: int - :param unique_key_policy: The unique key policy configuration for - specifying uniqueness constraints on documents in the collection in the - Azure Cosmos DB service. - :type unique_key_policy: ~azure.mgmt.cosmosdb.models.UniqueKeyPolicy - :param conflict_resolution_policy: The conflict resolution policy for the - container. - :type conflict_resolution_policy: - ~azure.mgmt.cosmosdb.models.ConflictResolutionPolicy - :param analytical_storage_ttl: Analytical TTL. - :type analytical_storage_ttl: long - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: float - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str - :ivar _self: A system generated property that specifies the addressable - path of the container resource. - :vartype _self: str - """ - - _validation = { - 'id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, - '_self': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'indexing_policy': {'key': 'indexingPolicy', 'type': 'IndexingPolicy'}, - 'partition_key': {'key': 'partitionKey', 'type': 'ContainerPartitionKey'}, - 'default_ttl': {'key': 'defaultTtl', 'type': 'int'}, - 'unique_key_policy': {'key': 'uniqueKeyPolicy', 'type': 'UniqueKeyPolicy'}, - 'conflict_resolution_policy': {'key': 'conflictResolutionPolicy', 'type': 'ConflictResolutionPolicy'}, - 'analytical_storage_ttl': {'key': 'analyticalStorageTtl', 'type': 'long'}, - '_rid': {'key': '_rid', 'type': 'str'}, - '_ts': {'key': '_ts', 'type': 'float'}, - '_etag': {'key': '_etag', 'type': 'str'}, - '_self': {'key': '_self', 'type': 'str'}, - } - - def __init__(self, *, id: str, indexing_policy=None, partition_key=None, default_ttl: int=None, unique_key_policy=None, conflict_resolution_policy=None, analytical_storage_ttl: int=None, **kwargs) -> None: - super(RestorableSqlContainerPropertiesResourceContainer, self).__init__(**kwargs) - self.id = id - self.indexing_policy = indexing_policy - self.partition_key = partition_key - self.default_ttl = default_ttl - self.unique_key_policy = unique_key_policy - self.conflict_resolution_policy = conflict_resolution_policy - self.analytical_storage_ttl = analytical_storage_ttl - self._rid = None - self._ts = None - self._etag = None - self._self = None - - -class RestorableSqlDatabaseGetResult(Model): - """An Azure Cosmos DB SQL database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param resource: The resource of an Azure Cosmos DB SQL database event - :type resource: - ~azure.mgmt.cosmosdb.models.RestorableSqlDatabasePropertiesResource - :ivar id: The unique resource Identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'resource': {'key': 'properties.resource', 'type': 'RestorableSqlDatabasePropertiesResource'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, resource=None, **kwargs) -> None: - super(RestorableSqlDatabaseGetResult, self).__init__(**kwargs) - self.resource = resource - self.id = None - self.name = None - self.type = None - - -class RestorableSqlDatabasePropertiesResource(Model): - """The resource of an Azure Cosmos DB SQL database event. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar operation_type: The operation type of this database event. Possible - values include: 'Create', 'Replace', 'Delete', 'SystemOperation' - :vartype operation_type: str or ~azure.mgmt.cosmosdb.models.OperationType - :ivar event_timestamp: The time when this database event happened. - :vartype event_timestamp: str - :ivar owner_id: The name of the SQL database. - :vartype owner_id: str - :ivar owner_resource_id: The resource ID of the SQL database. - :vartype owner_resource_id: str - :param database: Cosmos DB SQL database resource object - :type database: - ~azure.mgmt.cosmosdb.models.RestorableSqlDatabasePropertiesResourceDatabase - """ - - _validation = { - '_rid': {'readonly': True}, - 'operation_type': {'readonly': True}, - 'event_timestamp': {'readonly': True}, - 'owner_id': {'readonly': True}, - 'owner_resource_id': {'readonly': True}, - } - - _attribute_map = { - '_rid': {'key': '_rid', 'type': 'str'}, - 'operation_type': {'key': 'operationType', 'type': 'str'}, - 'event_timestamp': {'key': 'eventTimestamp', 'type': 'str'}, - 'owner_id': {'key': 'ownerId', 'type': 'str'}, - 'owner_resource_id': {'key': 'ownerResourceId', 'type': 'str'}, - 'database': {'key': 'database', 'type': 'RestorableSqlDatabasePropertiesResourceDatabase'}, - } - - def __init__(self, *, database=None, **kwargs) -> None: - super(RestorableSqlDatabasePropertiesResource, self).__init__(**kwargs) - self._rid = None - self.operation_type = None - self.event_timestamp = None - self.owner_id = None - self.owner_resource_id = None - self.database = database - - -class RestorableSqlDatabasePropertiesResourceDatabase(Model): - """Cosmos DB SQL database resource object. - - 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. - - :param id: Required. Name of the Cosmos DB SQL database - :type id: str - :ivar _rid: A system generated property. A unique identifier. - :vartype _rid: str - :ivar _ts: A system generated property that denotes the last updated - timestamp of the resource. - :vartype _ts: float - :ivar _etag: A system generated property representing the resource etag - required for optimistic concurrency control. - :vartype _etag: str - :ivar _colls: A system generated property that specified the addressable - path of the collections resource. - :vartype _colls: str - :ivar _users: A system generated property that specifies the addressable - path of the users resource. - :vartype _users: str - :ivar _self: A system generated property that specifies the addressable - path of the database resource. - :vartype _self: str - """ - - _validation = { - 'id': {'required': True}, - '_rid': {'readonly': True}, - '_ts': {'readonly': True}, - '_etag': {'readonly': True}, - '_colls': {'readonly': True}, - '_users': {'readonly': True}, - '_self': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - '_rid': {'key': '_rid', 'type': 'str'}, - '_ts': {'key': '_ts', 'type': 'float'}, - '_etag': {'key': '_etag', 'type': 'str'}, - '_colls': {'key': '_colls', 'type': 'str'}, - '_users': {'key': '_users', 'type': 'str'}, - '_self': {'key': '_self', 'type': 'str'}, - } - - def __init__(self, *, id: str, **kwargs) -> None: - super(RestorableSqlDatabasePropertiesResourceDatabase, self).__init__(**kwargs) - self.id = id - self._rid = None - self._ts = None - self._etag = None - self._colls = None - self._users = None - self._self = None - - -class RestoreParameters(Model): - """Parameters to indicate the information about the restore. - - :param restore_mode: Describes the mode of the restore. Possible values - include: 'PointInTime' - :type restore_mode: str or ~azure.mgmt.cosmosdb.models.RestoreMode - :param restore_source: The id of the restorable database account from - which the restore has to be initiated. For example: - /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} - :type restore_source: str - :param restore_timestamp_in_utc: Time to which the account has to be - restored (ISO-8601 format). - :type restore_timestamp_in_utc: datetime - :param databases_to_restore: List of specific databases available for - restore. - :type databases_to_restore: - list[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] - """ - - _attribute_map = { - 'restore_mode': {'key': 'restoreMode', 'type': 'str'}, - 'restore_source': {'key': 'restoreSource', 'type': 'str'}, - 'restore_timestamp_in_utc': {'key': 'restoreTimestampInUtc', 'type': 'iso-8601'}, - 'databases_to_restore': {'key': 'databasesToRestore', 'type': '[DatabaseRestoreResource]'}, - } - - def __init__(self, *, restore_mode=None, restore_source: str=None, restore_timestamp_in_utc=None, databases_to_restore=None, **kwargs) -> None: - super(RestoreParameters, self).__init__(**kwargs) - self.restore_mode = restore_mode - self.restore_source = restore_source - self.restore_timestamp_in_utc = restore_timestamp_in_utc - self.databases_to_restore = databases_to_restore - - -class RestoreReqeustDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties to restore 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. - - :param consistency_policy: The consistency policy for the Cosmos DB - account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication - locations enabled for the Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: Required. The offer type for the - database. Default value: "Standard" . - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to - enable/disable Virtual Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: 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. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured - for the Cosmos DB account. - :type virtual_network_rules: - list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :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 - :param disable_key_based_metadata_write_access: Disable write operations - on metadata resources (databases, containers, throughput) via account keys - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault - :type key_vault_key_uri: str - :param public_network_access: Whether requests from Public Network are - allowed. Possible values include: 'Enabled', 'Disabled' - :type public_network_access: str or - ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only - for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable - storage analytics. - :type enable_analytical_storage: bool - :param backup_policy: The object representing the policy for taking - backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass - firewall checks. Possible values include: 'None', 'AzureServices' - :type network_acl_bypass: str or - ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the - Resource Ids for Network Acl Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param create_mode: Required. Constant filled by server. - :type create_mode: str - :param restore_parameters: Parameters to indicate the information about - the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'NetworkAclBypass'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - def __init__(self, *, locations, consistency_policy=None, ip_rules=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, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, enable_free_tier: bool=None, api_properties=None, enable_analytical_storage: bool=None, backup_policy=None, cors=None, network_acl_bypass=None, network_acl_bypass_resource_ids=None, restore_parameters=None, **kwargs) -> None: - super(RestoreReqeustDatabaseAccountCreateUpdateProperties, self).__init__(consistency_policy=consistency_policy, locations=locations, ip_rules=ip_rules, is_virtual_network_filter_enabled=is_virtual_network_filter_enabled, enable_automatic_failover=enable_automatic_failover, capabilities=capabilities, virtual_network_rules=virtual_network_rules, enable_multiple_write_locations=enable_multiple_write_locations, enable_cassandra_connector=enable_cassandra_connector, connector_offer=connector_offer, disable_key_based_metadata_write_access=disable_key_based_metadata_write_access, key_vault_key_uri=key_vault_key_uri, public_network_access=public_network_access, enable_free_tier=enable_free_tier, api_properties=api_properties, enable_analytical_storage=enable_analytical_storage, backup_policy=backup_policy, cors=cors, network_acl_bypass=network_acl_bypass, network_acl_bypass_resource_ids=network_acl_bypass_resource_ids, **kwargs) - self.restore_parameters = restore_parameters - self.create_mode = 'Restore' - - -class SeedNode(Model): - """SeedNode. - - :param ip_address: IP address of this seed node. - :type ip_address: str - """ - - _attribute_map = { - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__(self, *, ip_address: str=None, **kwargs) -> None: - super(SeedNode, self).__init__(**kwargs) - self.ip_address = ip_address - - -class SpatialSpec(Model): - """SpatialSpec. - - :param path: The path for which the indexing behavior applies to. Index - paths typically start with root and end with wildcard (/path/*) - :type path: str - :param types: List of path's spatial type - :type types: list[str or ~azure.mgmt.cosmosdb.models.SpatialType] - """ - - _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'types': {'key': 'types', 'type': '[str]'}, - } - - def __init__(self, *, path: str=None, types=None, **kwargs) -> None: - super(SpatialSpec, self).__init__(**kwargs) - self.path = path - self.types = types - - -class SqlContainerCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB container. - - 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. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource - belongs. - :type location: str - :param tags: - :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a container - :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerResource - :param options: A key-value pair of options to be applied for the request. - This corresponds to the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'SqlContainerResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, - } - - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(SqlContainerCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options - - -class SqlContainerGetPropertiesOptions(OptionsResource): - """SqlContainerGetPropertiesOptions. +class SqlContainerGetPropertiesOptions(OptionsResource): + """SqlContainerGetPropertiesOptions. :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving @@ -5404,8 +3988,6 @@ class SqlContainerGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource @@ -5426,13 +4008,12 @@ class SqlContainerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(SqlContainerGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(SqlContainerGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5509,8 +4090,6 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a SQL database :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseResource :param options: A key-value pair of options to be applied for the request. @@ -5531,13 +4110,12 @@ class SqlDatabaseCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(SqlDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(SqlDatabaseCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5631,8 +4209,6 @@ class SqlDatabaseGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource @@ -5652,13 +4228,12 @@ class SqlDatabaseGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5685,176 +4260,6 @@ def __init__(self, *, id: str, **kwargs) -> None: self.id = id -class SqlRoleAssignmentCreateUpdateParameters(Model): - """Parameters to create and update an Azure Cosmos DB SQL Role Assignment. - - :param role_definition_id: The unique identifier for the associated Role - Definition. - :type role_definition_id: str - :param scope: The data plane resource path for which access is being - granted through this Role Assignment. - :type scope: str - :param principal_id: The unique identifier for the associated AAD - principal in the AAD graph to which access is being granted through this - Role Assignment. Tenant ID for the principal is inferred using the tenant - associated with the subscription. - :type principal_id: str - """ - - _attribute_map = { - 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, - } - - def __init__(self, *, role_definition_id: str=None, scope: str=None, principal_id: str=None, **kwargs) -> None: - super(SqlRoleAssignmentCreateUpdateParameters, self).__init__(**kwargs) - self.role_definition_id = role_definition_id - self.scope = scope - self.principal_id = principal_id - - -class SqlRoleAssignmentGetResults(ARMProxyResource): - """An Azure Cosmos DB Role Assignment. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param role_definition_id: The unique identifier for the associated Role - Definition. - :type role_definition_id: str - :param scope: The data plane resource path for which access is being - granted through this Role Assignment. - :type scope: str - :param principal_id: The unique identifier for the associated AAD - principal in the AAD graph to which access is being granted through this - Role Assignment. Tenant ID for the principal is inferred using the tenant - associated with the subscription. - :type principal_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_definition_id': {'key': 'properties.roleDefinitionId', 'type': 'str'}, - 'scope': {'key': 'properties.scope', 'type': 'str'}, - 'principal_id': {'key': 'properties.principalId', 'type': 'str'}, - } - - def __init__(self, *, role_definition_id: str=None, scope: str=None, principal_id: str=None, **kwargs) -> None: - super(SqlRoleAssignmentGetResults, self).__init__(**kwargs) - self.role_definition_id = role_definition_id - self.scope = scope - self.principal_id = principal_id - - -class SqlRoleDefinitionCreateUpdateParameters(Model): - """Parameters to create and update an Azure Cosmos DB SQL Role Definition. - - :param role_name: A user-friendly name for the Role Definition. Must be - unique for the database account. - :type role_name: str - :param type: Indicates whether the Role Definition was built-in or user - created. Possible values include: 'BuiltInRole', 'CustomRole' - :type type: str or ~azure.mgmt.cosmosdb.models.RoleDefinitionType - :param assignable_scopes: A set of fully qualified Scopes at or below - which Role Assignments may be created using this Role Definition. This - will allow application of this Role Definition on the entire database - account or any underlying Database / Collection. Must have at least one - element. Scopes higher than Database account are not enforceable as - assignable Scopes. Note that resources referenced in assignable Scopes - need not exist. - :type assignable_scopes: list[str] - :param permissions: The set of operations allowed through this Role - Definition. - :type permissions: list[~azure.mgmt.cosmosdb.models.Permission] - """ - - _attribute_map = { - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'RoleDefinitionType'}, - 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, - 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, - } - - def __init__(self, *, role_name: str=None, type=None, assignable_scopes=None, permissions=None, **kwargs) -> None: - super(SqlRoleDefinitionCreateUpdateParameters, self).__init__(**kwargs) - self.role_name = role_name - self.type = type - self.assignable_scopes = assignable_scopes - self.permissions = permissions - - -class SqlRoleDefinitionGetResults(ARMProxyResource): - """An Azure Cosmos DB SQL Role Definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param role_name: A user-friendly name for the Role Definition. Must be - unique for the database account. - :type role_name: str - :param sql_role_definition_get_results_type: Indicates whether the Role - Definition was built-in or user created. Possible values include: - 'BuiltInRole', 'CustomRole' - :type sql_role_definition_get_results_type: str or - ~azure.mgmt.cosmosdb.models.RoleDefinitionType - :param assignable_scopes: A set of fully qualified Scopes at or below - which Role Assignments may be created using this Role Definition. This - will allow application of this Role Definition on the entire database - account or any underlying Database / Collection. Must have at least one - element. Scopes higher than Database account are not enforceable as - assignable Scopes. Note that resources referenced in assignable Scopes - need not exist. - :type assignable_scopes: list[str] - :param permissions: The set of operations allowed through this Role - Definition. - :type permissions: list[~azure.mgmt.cosmosdb.models.Permission] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'role_name': {'key': 'properties.roleName', 'type': 'str'}, - 'sql_role_definition_get_results_type': {'key': 'properties.type', 'type': 'RoleDefinitionType'}, - 'assignable_scopes': {'key': 'properties.assignableScopes', 'type': '[str]'}, - 'permissions': {'key': 'properties.permissions', 'type': '[Permission]'}, - } - - def __init__(self, *, role_name: str=None, sql_role_definition_get_results_type=None, assignable_scopes=None, permissions=None, **kwargs) -> None: - super(SqlRoleDefinitionGetResults, self).__init__(**kwargs) - self.role_name = role_name - self.sql_role_definition_get_results_type = sql_role_definition_get_results_type - self.assignable_scopes = assignable_scopes - self.permissions = permissions - - class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB storedProcedure. @@ -5874,8 +4279,6 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a storedProcedure :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureResource :param options: A key-value pair of options to be applied for the request. @@ -5896,13 +4299,12 @@ class SqlStoredProcedureCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(SqlStoredProcedureCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(SqlStoredProcedureCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -5970,8 +4372,6 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetPropertiesResource @@ -5989,12 +4389,11 @@ class SqlStoredProcedureGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlStoredProcedureGetPropertiesResource'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, **kwargs) -> None: - super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(SqlStoredProcedureGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -6043,8 +4442,6 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a trigger :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerResource :param options: A key-value pair of options to be applied for the request. @@ -6065,13 +4462,12 @@ class SqlTriggerCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(SqlTriggerCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(SqlTriggerCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -6150,8 +4546,6 @@ class SqlTriggerGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlTriggerGetPropertiesResource @@ -6169,12 +4563,11 @@ class SqlTriggerGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlTriggerGetPropertiesResource'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, **kwargs) -> None: - super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(SqlTriggerGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -6234,8 +4627,6 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a userDefinedFunction :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionResource @@ -6257,13 +4648,12 @@ class SqlUserDefinedFunctionCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(SqlUserDefinedFunctionCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -6331,8 +4721,6 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlUserDefinedFunctionGetPropertiesResource @@ -6350,12 +4738,11 @@ class SqlUserDefinedFunctionGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'SqlUserDefinedFunctionGetPropertiesResource'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, **kwargs) -> None: - super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(SqlUserDefinedFunctionGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -6385,46 +4772,6 @@ def __init__(self, *, id: str, body: str=None, **kwargs) -> None: self.body = body -class SystemData(Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. - Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - :type created_by_type: str or ~azure.mgmt.cosmosdb.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the - resource. Possible values include: 'User', 'Application', - 'ManagedIdentity', 'Key' - :type last_modified_by_type: str or - ~azure.mgmt.cosmosdb.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC) - :type last_modified_at: datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: - super(SystemData, self).__init__(**kwargs) - self.created_by = created_by - self.created_by_type = created_by_type - self.created_at = created_at - self.last_modified_by = last_modified_by - self.last_modified_by_type = last_modified_by_type - self.last_modified_at = last_modified_at - - class TableCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB Table. @@ -6444,8 +4791,6 @@ class TableCreateUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a Table :type resource: ~azure.mgmt.cosmosdb.models.TableResource :param options: A key-value pair of options to be applied for the request. @@ -6466,13 +4811,12 @@ class TableCreateUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableResource'}, 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, options=None, **kwargs) -> None: - super(TableCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, options=None, **kwargs) -> None: + super(TableCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -6556,8 +4900,6 @@ class TableGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource :param options: @@ -6576,13 +4918,12 @@ class TableGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, options=None, **kwargs) -> None: - super(TableGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: + super(TableGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource self.options = options @@ -6705,8 +5046,6 @@ class ThroughputSettingsGetResults(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsGetPropertiesResource @@ -6724,12 +5063,11 @@ class ThroughputSettingsGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsGetPropertiesResource'}, } - def __init__(self, *, location: str=None, tags=None, identity=None, resource=None, **kwargs) -> None: - super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + super(ThroughputSettingsGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource @@ -6793,8 +5131,6 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): :type location: str :param tags: :type tags: dict[str, str] - :param identity: - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param resource: Required. The standard JSON format of a resource throughput :type resource: ~azure.mgmt.cosmosdb.models.ThroughputSettingsResource @@ -6813,12 +5149,11 @@ class ThroughputSettingsUpdateParameters(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'resource': {'key': 'properties.resource', 'type': 'ThroughputSettingsResource'}, } - def __init__(self, *, resource, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(ThroughputSettingsUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + def __init__(self, *, resource, location: str=None, tags=None, **kwargs) -> None: + super(ThroughputSettingsUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py index 21c7b14a6559..3ea4f5d46a00 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py @@ -181,32 +181,6 @@ class SqlTriggerGetResultsPaged(Paged): def __init__(self, *args, **kwargs): super(SqlTriggerGetResultsPaged, self).__init__(*args, **kwargs) -class SqlRoleDefinitionGetResultsPaged(Paged): - """ - A paging container for iterating over a list of :class:`SqlRoleDefinitionGetResults ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlRoleDefinitionGetResults]'} - } - - def __init__(self, *args, **kwargs): - - super(SqlRoleDefinitionGetResultsPaged, self).__init__(*args, **kwargs) -class SqlRoleAssignmentGetResultsPaged(Paged): - """ - A paging container for iterating over a list of :class:`SqlRoleAssignmentGetResults ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SqlRoleAssignmentGetResults]'} - } - - def __init__(self, *args, **kwargs): - - super(SqlRoleAssignmentGetResultsPaged, self).__init__(*args, **kwargs) class MongoDBDatabaseGetResultsPaged(Paged): """ A paging container for iterating over a list of :class:`MongoDBDatabaseGetResults ` object @@ -298,19 +272,6 @@ class GremlinGraphGetResultsPaged(Paged): def __init__(self, *args, **kwargs): super(GremlinGraphGetResultsPaged, self).__init__(*args, **kwargs) -class RestorableDatabaseAccountGetResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableDatabaseAccountGetResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableDatabaseAccountGetResult]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableDatabaseAccountGetResultPaged, self).__init__(*args, **kwargs) class NotebookWorkspacePaged(Paged): """ A paging container for iterating over a list of :class:`NotebookWorkspace ` object @@ -324,110 +285,6 @@ class NotebookWorkspacePaged(Paged): def __init__(self, *args, **kwargs): super(NotebookWorkspacePaged, self).__init__(*args, **kwargs) -class RestorableSqlDatabaseGetResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableSqlDatabaseGetResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableSqlDatabaseGetResult]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableSqlDatabaseGetResultPaged, self).__init__(*args, **kwargs) -class RestorableSqlContainerGetResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableSqlContainerGetResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableSqlContainerGetResult]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableSqlContainerGetResultPaged, self).__init__(*args, **kwargs) -class DatabaseRestoreResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`DatabaseRestoreResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DatabaseRestoreResource]'} - } - - def __init__(self, *args, **kwargs): - - super(DatabaseRestoreResourcePaged, self).__init__(*args, **kwargs) -class RestorableMongodbDatabaseGetResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableMongodbDatabaseGetResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableMongodbDatabaseGetResult]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableMongodbDatabaseGetResultPaged, self).__init__(*args, **kwargs) -class RestorableMongodbCollectionGetResultPaged(Paged): - """ - A paging container for iterating over a list of :class:`RestorableMongodbCollectionGetResult ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RestorableMongodbCollectionGetResult]'} - } - - def __init__(self, *args, **kwargs): - - super(RestorableMongodbCollectionGetResultPaged, self).__init__(*args, **kwargs) -class ClusterResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`ClusterResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ClusterResource]'} - } - - def __init__(self, *args, **kwargs): - - super(ClusterResourcePaged, self).__init__(*args, **kwargs) -class BackupResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`BackupResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackupResource]'} - } - - def __init__(self, *args, **kwargs): - - super(BackupResourcePaged, self).__init__(*args, **kwargs) -class DataCenterResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`DataCenterResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[DataCenterResource]'} - } - - def __init__(self, *args, **kwargs): - - super(DataCenterResourcePaged, self).__init__(*args, **kwargs) class PrivateLinkResourcePaged(Paged): """ A paging container for iterating over a list of :class:`PrivateLinkResource ` object diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py index d059f337e54f..bf6987802bed 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py @@ -27,16 +27,7 @@ from ._table_resources_operations import TableResourcesOperations from ._cassandra_resources_operations import CassandraResourcesOperations from ._gremlin_resources_operations import GremlinResourcesOperations -from ._restorable_database_accounts_operations import RestorableDatabaseAccountsOperations from ._notebook_workspaces_operations import NotebookWorkspacesOperations -from ._restorable_sql_databases_operations import RestorableSqlDatabasesOperations -from ._restorable_sql_containers_operations import RestorableSqlContainersOperations -from ._restorable_sql_resources_operations import RestorableSqlResourcesOperations -from ._restorable_mongodb_databases_operations import RestorableMongodbDatabasesOperations -from ._restorable_mongodb_collections_operations import RestorableMongodbCollectionsOperations -from ._restorable_mongodb_resources_operations import RestorableMongodbResourcesOperations -from ._cassandra_clusters_operations import CassandraClustersOperations -from ._cassandra_data_centers_operations import CassandraDataCentersOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations @@ -59,16 +50,7 @@ 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'RestorableDatabaseAccountsOperations', 'NotebookWorkspacesOperations', - 'RestorableSqlDatabasesOperations', - 'RestorableSqlContainersOperations', - 'RestorableSqlResourcesOperations', - 'RestorableMongodbDatabasesOperations', - 'RestorableMongodbCollectionsOperations', - 'RestorableMongodbResourcesOperations', - 'CassandraClustersOperations', - 'CassandraDataCentersOperations', 'PrivateLinkResourcesOperations', 'PrivateEndpointConnectionsOperations', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py deleted file mode 100644 index 701dfcf091cb..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py +++ /dev/null @@ -1,858 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class CassandraClustersOperations(object): - """CassandraClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """List all managed Cassandra clusters in this subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ClusterResource - :rtype: - ~azure.mgmt.cosmosdb.models.ClusterResourcePaged[~azure.mgmt.cosmosdb.models.ClusterResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ClusterResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/cassandraClusters'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all managed Cassandra clusters in this resource group. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ClusterResource - :rtype: - ~azure.mgmt.cosmosdb.models.ClusterResourcePaged[~azure.mgmt.cosmosdb.models.ClusterResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ClusterResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters'} - - def get( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """Get the properties of a managed Cassandra cluster. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ClusterResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.ClusterResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} - - - def _delete_initial( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a managed Cassandra cluster. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} - - - def _create_update_initial( - self, resource_group_name, cluster_name, body, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'ClusterResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', response) - if response.status_code == 201: - deserialized = self._deserialize('ClusterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update( - self, resource_group_name, cluster_name, body, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a managed Cassandra cluster. When updating, you must - specify all writable properties. To update only some properties, use - PATCH. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param body: The properties specifying the desired state of the - managed Cassandra cluster. - :type body: ~azure.mgmt.cosmosdb.models.ClusterResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ClusterResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ClusterResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ClusterResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - body=body, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ClusterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} - - - def _update_initial( - self, resource_group_name, cluster_name, body, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'ClusterResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ClusterResource', response) - if response.status_code == 202: - deserialized = self._deserialize('ClusterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, cluster_name, body, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates some of the properties of a managed Cassandra cluster. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param body: Parameters to provide for specifying the managed - Cassandra cluster. - :type body: ~azure.mgmt.cosmosdb.models.ClusterResource - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ClusterResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ClusterResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ClusterResource]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - body=body, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ClusterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} - - - def _request_repair_initial( - self, resource_group_name, cluster_name, keyspace, tables=None, custom_headers=None, raw=False, **operation_config): - body = models.RepairPostBody(keyspace=keyspace, tables=tables) - - # Construct URL - url = self.request_repair.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'RepairPostBody') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def request_repair( - self, resource_group_name, cluster_name, keyspace, tables=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Request that repair begin on this cluster as soon as possible. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param keyspace: The name of the keyspace that repair should be run - on. - :type keyspace: str - :param tables: List of tables in the keyspace to repair. If omitted, - repair all tables in the keyspace. - :type tables: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._request_repair_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - keyspace=keyspace, - tables=tables, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - request_repair.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} - - - def _fetch_node_status_initial( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.fetch_node_status.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ClusterNodeStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def fetch_node_status( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Request the status of all nodes in the cluster (as returned by - 'nodetool status'). - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ClusterNodeStatus or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ClusterNodeStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ClusterNodeStatus]] - :raises: :class:`CloudError` - """ - raw_result = self._fetch_node_status_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ClusterNodeStatus', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - fetch_node_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} - - def list_backups_method( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """List the backups of this cluster that are available to restore. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackupResource - :rtype: - ~azure.mgmt.cosmosdb.models.BackupResourcePaged[~azure.mgmt.cosmosdb.models.BackupResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_backups_method.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.BackupResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_backups_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups'} - - def get_backup( - self, resource_group_name, cluster_name, backup_id, custom_headers=None, raw=False, **operation_config): - """Get the properties of an individual backup of this cluster that is - available to restore. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. - :type backup_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackupResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.BackupResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_backup.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*'), - 'backupId': self._serialize.url("backup_id", backup_id, 'str', max_length=15, min_length=1, pattern=r'^[0-9]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BackupResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py deleted file mode 100644 index 7fc6324b98cf..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py +++ /dev/null @@ -1,489 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class CassandraDataCentersOperations(object): - """CassandraDataCentersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """List all data centers in a particular managed Cassandra cluster. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DataCenterResource - :rtype: - ~azure.mgmt.cosmosdb.models.DataCenterResourcePaged[~azure.mgmt.cosmosdb.models.DataCenterResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DataCenterResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters'} - - def get( - self, resource_group_name, cluster_name, data_center_name, custom_headers=None, raw=False, **operation_config): - """Get the properties of a managed Cassandra data center. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra - cluster. - :type data_center_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: DataCenterResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.DataCenterResource or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*'), - 'dataCenterName': self._serialize.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}'} - - - def _delete_initial( - self, resource_group_name, cluster_name, data_center_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*'), - 'dataCenterName': self._serialize.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, cluster_name, data_center_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete a managed Cassandra data center. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra - cluster. - :type data_center_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - data_center_name=data_center_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}'} - - - def _create_update_initial( - self, resource_group_name, cluster_name, data_center_name, properties=None, custom_headers=None, raw=False, **operation_config): - body = models.DataCenterResource(properties=properties) - - # Construct URL - url = self.create_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*'), - 'dataCenterName': self._serialize.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'DataCenterResource') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', response) - if response.status_code == 201: - deserialized = self._deserialize('DataCenterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update( - self, resource_group_name, cluster_name, data_center_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Create or update a managed Cassandra data center. When updating, - overwrite all properties. To update only some properties, use PATCH. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra - cluster. - :type data_center_name: str - :param properties: Properties of a managed Cassandra data center. - :type properties: - ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns DataCenterResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.DataCenterResource]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - data_center_name=data_center_name, - properties=properties, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('DataCenterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}'} - - - def _update_initial( - self, resource_group_name, cluster_name, data_center_name, properties=None, custom_headers=None, raw=False, **operation_config): - body = models.DataCenterResource(properties=properties) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*'), - 'dataCenterName': self._serialize.url("data_center_name", data_center_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(body, 'DataCenterResource') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('DataCenterResource', response) - if response.status_code == 202: - deserialized = self._deserialize('DataCenterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, cluster_name, data_center_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Update some of the properties of a managed Cassandra data center. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :param data_center_name: Data center name in a managed Cassandra - cluster. - :type data_center_name: str - :param properties: Properties of a managed Cassandra data center. - :type properties: - ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns DataCenterResource or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.DataCenterResource] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.DataCenterResource]] - :raises: :class:`CloudError` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - data_center_name=data_center_name, - properties=properties, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('DataCenterResource', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/dataCenters/{dataCenterName}'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py index c75d5ca7df4b..9d4f92371710 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py @@ -27,7 +27,7 @@ class CassandraResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config @@ -579,9 +579,7 @@ def _migrate_cassandra_keyspace_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -618,7 +616,8 @@ def migrate_cassandra_keyspace_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_cassandra_keyspace_to_autoscale_initial( resource_group_name=resource_group_name, @@ -679,9 +678,7 @@ def _migrate_cassandra_keyspace_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -718,7 +715,8 @@ def migrate_cassandra_keyspace_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_cassandra_keyspace_to_manual_throughput_initial( resource_group_name=resource_group_name, @@ -1307,9 +1305,7 @@ def _migrate_cassandra_table_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1348,7 +1344,8 @@ def migrate_cassandra_table_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_cassandra_table_to_autoscale_initial( resource_group_name=resource_group_name, @@ -1411,9 +1408,7 @@ def _migrate_cassandra_table_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1452,7 +1447,8 @@ def migrate_cassandra_table_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_cassandra_table_to_manual_throughput_initial( resource_group_name=resource_group_name, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py index 40227cd84d01..df206bdff52f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py @@ -25,7 +25,7 @@ class CollectionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py index 23c5e18c737e..ed6e332031fe 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py @@ -25,7 +25,7 @@ class CollectionPartitionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py index 6f35e35f9e46..8b7758f9602a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py @@ -25,7 +25,7 @@ class CollectionPartitionRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py index 6301be332114..a6fb17174967 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py @@ -25,7 +25,7 @@ class CollectionRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py index f75a4a050456..800ba76d84d0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py @@ -25,7 +25,7 @@ class DatabaseAccountRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py index 3a1c76a5e292..6a73b0f35086 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py @@ -27,7 +27,7 @@ class DatabaseAccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py index e089036d2946..5de74b6fd485 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py @@ -25,7 +25,7 @@ class DatabaseOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py index 01479871568e..5d8ad6d36b60 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py @@ -27,7 +27,7 @@ class GremlinResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config @@ -579,9 +579,7 @@ def _migrate_gremlin_database_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -618,7 +616,8 @@ def migrate_gremlin_database_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_gremlin_database_to_autoscale_initial( resource_group_name=resource_group_name, @@ -679,9 +678,7 @@ def _migrate_gremlin_database_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -718,7 +715,8 @@ def migrate_gremlin_database_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_gremlin_database_to_manual_throughput_initial( resource_group_name=resource_group_name, @@ -1306,9 +1304,7 @@ def _migrate_gremlin_graph_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1347,7 +1343,8 @@ def migrate_gremlin_graph_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_gremlin_graph_to_autoscale_initial( resource_group_name=resource_group_name, @@ -1410,9 +1407,7 @@ def _migrate_gremlin_graph_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1451,7 +1446,8 @@ def migrate_gremlin_graph_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_gremlin_graph_to_manual_throughput_initial( resource_group_name=resource_group_name, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py index 957bd2ff5550..eed1d0abd891 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py @@ -27,7 +27,7 @@ class MongoDBResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config @@ -475,9 +475,7 @@ def _update_mongo_db_database_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -517,7 +515,8 @@ def update_mongo_db_database_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._update_mongo_db_database_throughput_initial( resource_group_name=resource_group_name, @@ -579,9 +578,7 @@ def _migrate_mongo_db_database_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -618,7 +615,8 @@ def migrate_mongo_db_database_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_mongo_db_database_to_autoscale_initial( resource_group_name=resource_group_name, @@ -679,9 +677,7 @@ def _migrate_mongo_db_database_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -718,7 +714,8 @@ def migrate_mongo_db_database_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_mongo_db_database_to_manual_throughput_initial( resource_group_name=resource_group_name, @@ -1307,9 +1304,7 @@ def _migrate_mongo_db_collection_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1348,7 +1343,8 @@ def migrate_mongo_db_collection_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_mongo_db_collection_to_autoscale_initial( resource_group_name=resource_group_name, @@ -1411,9 +1407,7 @@ def _migrate_mongo_db_collection_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1452,7 +1446,8 @@ def migrate_mongo_db_collection_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_mongo_db_collection_to_manual_throughput_initial( resource_group_name=resource_group_name, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py index ad4f17828a32..62bec0558b4b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py @@ -26,7 +26,7 @@ class NotebookWorkspacesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". :ivar notebook_workspace_name: The name of the notebook workspace resource. Constant value: "default". """ @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.notebook_workspace_name = "default" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py index f08d8cfa1813..4c8928ef591e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py index 82bb73eed8c5..f1228d630de4 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py @@ -25,7 +25,7 @@ class PartitionKeyRangeIdOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py index 249a2b10a29f..cd5280abbe48 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -25,7 +25,7 @@ class PartitionKeyRangeIdRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py index f40581ab3d9a..953eaab02328 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py @@ -25,7 +25,7 @@ class PercentileOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py index 7d91cf62927b..423d15d00d9b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py @@ -25,7 +25,7 @@ class PercentileSourceTargetOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py index c61746e5d06c..bbfb56fadc83 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py @@ -25,7 +25,7 @@ class PercentileTargetOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py index 6ac610136777..ab3dc1c9b9c8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py @@ -27,7 +27,7 @@ class PrivateEndpointConnectionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py index 9e8d3cd481c3..bc5051953f64 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py @@ -25,7 +25,7 @@ class PrivateLinkResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py deleted file mode 100644 index ac176e6af7eb..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableDatabaseAccountsOperations(object): - """RestorableDatabaseAccountsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list_by_location( - self, location, custom_headers=None, raw=False, **operation_config): - """Lists all the restorable Azure Cosmos DB database accounts available - under the subscription and in a region. This call requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RestorableDatabaseAccountGetResult - :rtype: - ~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResultPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_location.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RestorableDatabaseAccountGetResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts'} - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all the restorable Azure Cosmos DB database accounts available - under the subscription. This call requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read' - permission. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RestorableDatabaseAccountGetResult - :rtype: - ~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResultPaged[~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RestorableDatabaseAccountGetResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/restorableDatabaseAccounts'} - - def get_by_location( - self, location, instance_id, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure Cosmos DB restorable - database account. This call requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/read/*' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestorableDatabaseAccountGetResult or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.cosmosdb.models.RestorableDatabaseAccountGetResult - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_by_location.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('RestorableDatabaseAccountGetResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py deleted file mode 100644 index 86cd9f37d483..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableMongodbCollectionsOperations(object): - """RestorableMongodbCollectionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, location, instance_id, restorable_mongodb_database_rid=None, custom_headers=None, raw=False, **operation_config): - """Show the event feed of all mutations done on all the Azure Cosmos DB - MongoDB collections under a specific database. This helps in scenario - where container was accidentally deleted. This API requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param restorable_mongodb_database_rid: The resource ID of the MongoDB - database. - :type restorable_mongodb_database_rid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RestorableMongodbCollectionGetResult - :rtype: - ~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionGetResultPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbCollectionGetResult] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if restorable_mongodb_database_rid is not None: - query_parameters['restorableMongodbDatabaseRid'] = self._serialize.query("restorable_mongodb_database_rid", restorable_mongodb_database_rid, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RestorableMongodbCollectionGetResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py deleted file mode 100644 index 7cf460698b51..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableMongodbDatabasesOperations(object): - """RestorableMongodbDatabasesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, location, instance_id, custom_headers=None, raw=False, **operation_config): - """Show the event feed of all mutations done on all the Azure Cosmos DB - MongoDB databases under the restorable account. This helps in scenario - where database was accidentally deleted to get the deletion time. This - API requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of - RestorableMongodbDatabaseGetResult - :rtype: - ~azure.mgmt.cosmosdb.models.RestorableMongodbDatabaseGetResultPaged[~azure.mgmt.cosmosdb.models.RestorableMongodbDatabaseGetResult] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RestorableMongodbDatabaseGetResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbDatabases'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py deleted file mode 100644 index 878544363970..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableMongodbResourcesOperations(object): - """RestorableMongodbResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, location, instance_id, restore_location=None, restore_timestamp_in_utc=None, custom_headers=None, raw=False, **operation_config): - """Return a list of database and collection combo that exist on the - account at the given timestamp and location. This helps in scenarios to - validate what resources exist at given timestamp and location. This API - requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param restore_location: The location where the restorable resources - are located. - :type restore_location: str - :param restore_timestamp_in_utc: The timestamp when the restorable - resources existed. - :type restore_timestamp_in_utc: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DatabaseRestoreResource - :rtype: - ~azure.mgmt.cosmosdb.models.DatabaseRestoreResourcePaged[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if restore_location is not None: - query_parameters['restoreLocation'] = self._serialize.query("restore_location", restore_location, 'str') - if restore_timestamp_in_utc is not None: - query_parameters['restoreTimestampInUtc'] = self._serialize.query("restore_timestamp_in_utc", restore_timestamp_in_utc, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DatabaseRestoreResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbResources'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py deleted file mode 100644 index f6b5abd52ea2..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableSqlContainersOperations(object): - """RestorableSqlContainersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, location, instance_id, restorable_sql_database_rid=None, custom_headers=None, raw=False, **operation_config): - """Show the event feed of all mutations done on all the Azure Cosmos DB - SQL containers under a specific database. This helps in scenario where - container was accidentally deleted. This API requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param restorable_sql_database_rid: The resource ID of the SQL - database. - :type restorable_sql_database_rid: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RestorableSqlContainerGetResult - :rtype: - ~azure.mgmt.cosmosdb.models.RestorableSqlContainerGetResultPaged[~azure.mgmt.cosmosdb.models.RestorableSqlContainerGetResult] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if restorable_sql_database_rid is not None: - query_parameters['restorableSqlDatabaseRid'] = self._serialize.query("restorable_sql_database_rid", restorable_sql_database_rid, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RestorableSqlContainerGetResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlContainers'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py deleted file mode 100644 index afd044bcc225..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableSqlDatabasesOperations(object): - """RestorableSqlDatabasesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, location, instance_id, custom_headers=None, raw=False, **operation_config): - """Show the event feed of all mutations done on all the Azure Cosmos DB - SQL databases under the restorable account. This helps in scenario - where database was accidentally deleted to get the deletion time. This - API requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RestorableSqlDatabaseGetResult - :rtype: - ~azure.mgmt.cosmosdb.models.RestorableSqlDatabaseGetResultPaged[~azure.mgmt.cosmosdb.models.RestorableSqlDatabaseGetResult] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.RestorableSqlDatabaseGetResultPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlDatabases'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py deleted file mode 100644 index 1e7843cb53f9..000000000000 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class RestorableSqlResourcesOperations(object): - """RestorableSqlResourcesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2021-03-01-preview" - - self.config = config - - def list( - self, location, instance_id, restore_location=None, restore_timestamp_in_utc=None, custom_headers=None, raw=False, **operation_config): - """Return a list of database and container combo that exist on the account - at the given timestamp and location. This helps in scenarios to - validate what resources exist at given timestamp and location. This API - requires - 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' - permission. - - :param location: Cosmos DB region, with spaces between words and each - word capitalized. - :type location: str - :param instance_id: The instanceId GUID of a restorable database - account. - :type instance_id: str - :param restore_location: The location where the restorable resources - are located. - :type restore_location: str - :param restore_timestamp_in_utc: The timestamp when the restorable - resources existed. - :type restore_timestamp_in_utc: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of DatabaseRestoreResource - :rtype: - ~azure.mgmt.cosmosdb.models.DatabaseRestoreResourcePaged[~azure.mgmt.cosmosdb.models.DatabaseRestoreResource] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'location': self._serialize.url("location", location, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - if restore_location is not None: - query_parameters['restoreLocation'] = self._serialize.query("restore_location", restore_location, 'str') - if restore_timestamp_in_utc is not None: - query_parameters['restoreTimestampInUtc'] = self._serialize.query("restore_timestamp_in_utc", restore_timestamp_in_utc, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.DatabaseRestoreResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableSqlResources'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py index a53c352e5976..08055aa0babe 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py @@ -27,7 +27,7 @@ class SqlResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config @@ -578,9 +578,7 @@ def _migrate_sql_database_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -617,7 +615,8 @@ def migrate_sql_database_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_sql_database_to_autoscale_initial( resource_group_name=resource_group_name, @@ -678,9 +677,7 @@ def _migrate_sql_database_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -717,7 +714,8 @@ def migrate_sql_database_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_sql_database_to_manual_throughput_initial( resource_group_name=resource_group_name, @@ -1305,9 +1303,7 @@ def _migrate_sql_container_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1346,7 +1342,8 @@ def migrate_sql_container_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_sql_container_to_autoscale_initial( resource_group_name=resource_group_name, @@ -1409,9 +1406,7 @@ def _migrate_sql_container_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -1450,7 +1445,8 @@ def migrate_sql_container_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_sql_container_to_manual_throughput_initial( resource_group_name=resource_group_name, @@ -1502,7 +1498,8 @@ def list_sql_stored_procedures( :return: An iterator like instance of SqlStoredProcedureGetResults :rtype: ~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlStoredProcedureGetResults] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ def prepare_request(next_link=None): if not next_link: @@ -1545,9 +1542,7 @@ def internal_paging(next_link=None): response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) return response @@ -2559,665 +2554,3 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete_sql_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/{triggerName}'} - - def get_sql_role_definition( - self, role_definition_id, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure Cosmos DB SQL Role - Definition with the given Id. - - :param role_definition_id: The GUID for the Role Definition. - :type role_definition_id: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SqlRoleDefinitionGetResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sql_role_definition.metadata['url'] - path_format_arguments = { - 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SqlRoleDefinitionGetResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sql_role_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}'} - - - def _create_update_sql_role_definition_initial( - self, role_definition_id, resource_group_name, account_name, create_update_sql_role_definition_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_update_sql_role_definition.metadata['url'] - path_format_arguments = { - 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_sql_role_definition_parameters, 'SqlRoleDefinitionCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SqlRoleDefinitionGetResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_sql_role_definition( - self, role_definition_id, resource_group_name, account_name, create_update_sql_role_definition_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an Azure Cosmos DB SQL Role Definition. - - :param role_definition_id: The GUID for the Role Definition. - :type role_definition_id: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param create_update_sql_role_definition_parameters: The properties - required to create or update a Role Definition. - :type create_update_sql_role_definition_parameters: - ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionCreateUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - SqlRoleDefinitionGetResults or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_sql_role_definition_initial( - role_definition_id=role_definition_id, - resource_group_name=resource_group_name, - account_name=account_name, - create_update_sql_role_definition_parameters=create_update_sql_role_definition_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlRoleDefinitionGetResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_sql_role_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}'} - - - def _delete_sql_role_definition_initial( - self, role_definition_id, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_sql_role_definition.metadata['url'] - path_format_arguments = { - 'roleDefinitionId': self._serialize.url("role_definition_id", role_definition_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_sql_role_definition( - self, role_definition_id, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB SQL Role Definition. - - :param role_definition_id: The GUID for the Role Definition. - :type role_definition_id: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_sql_role_definition_initial( - role_definition_id=role_definition_id, - resource_group_name=resource_group_name, - account_name=account_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_sql_role_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions/{roleDefinitionId}'} - - def list_sql_role_definitions( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the list of all Azure Cosmos DB SQL Role Definitions. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SqlRoleDefinitionGetResults - :rtype: - ~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlRoleDefinitionGetResults] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_sql_role_definitions.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlRoleDefinitionGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_sql_role_definitions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleDefinitions'} - - def get_sql_role_assignment( - self, role_assignment_id, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the properties of an existing Azure Cosmos DB SQL Role - Assignment with the given Id. - - :param role_assignment_id: The GUID for the Role Assignment. - :type role_assignment_id: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SqlRoleAssignmentGetResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_sql_role_assignment.metadata['url'] - path_format_arguments = { - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SqlRoleAssignmentGetResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_sql_role_assignment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}'} - - - def _create_update_sql_role_assignment_initial( - self, role_assignment_id, resource_group_name, account_name, create_update_sql_role_assignment_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_update_sql_role_assignment.metadata['url'] - path_format_arguments = { - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(create_update_sql_role_assignment_parameters, 'SqlRoleAssignmentCreateUpdateParameters') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SqlRoleAssignmentGetResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_update_sql_role_assignment( - self, role_assignment_id, resource_group_name, account_name, create_update_sql_role_assignment_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates an Azure Cosmos DB SQL Role Assignment. - - :param role_assignment_id: The GUID for the Role Assignment. - :type role_assignment_id: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param create_update_sql_role_assignment_parameters: The properties - required to create or update a Role Assignment. - :type create_update_sql_role_assignment_parameters: - ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentCreateUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - SqlRoleAssignmentGetResults or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults]] - :raises: :class:`CloudError` - """ - raw_result = self._create_update_sql_role_assignment_initial( - role_assignment_id=role_assignment_id, - resource_group_name=resource_group_name, - account_name=account_name, - create_update_sql_role_assignment_parameters=create_update_sql_role_assignment_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('SqlRoleAssignmentGetResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_update_sql_role_assignment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}'} - - - def _delete_sql_role_assignment_initial( - self, role_assignment_id, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete_sql_role_assignment.metadata['url'] - path_format_arguments = { - 'roleAssignmentId': self._serialize.url("role_assignment_id", role_assignment_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_sql_role_assignment( - self, role_assignment_id, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Azure Cosmos DB SQL Role Assignment. - - :param role_assignment_id: The GUID for the Role Assignment. - :type role_assignment_id: str - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` - """ - raw_result = self._delete_sql_role_assignment_initial( - role_assignment_id=role_assignment_id, - resource_group_name=resource_group_name, - account_name=account_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_sql_role_assignment.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments/{roleAssignmentId}'} - - def list_sql_role_assignments( - self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the list of all Azure Cosmos DB SQL Role Assignments. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param account_name: Cosmos DB database account name. - :type account_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SqlRoleAssignmentGetResults - :rtype: - ~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResultsPaged[~azure.mgmt.cosmosdb.models.SqlRoleAssignmentGetResults] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_sql_role_assignments.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SqlRoleAssignmentGetResultsPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_sql_role_assignments.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlRoleAssignments'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py index c2a4d1281463..1eb6b13d0e81 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py @@ -27,7 +27,7 @@ class TableResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-15". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2021-03-01-preview" + self.api_version = "2021-03-15" self.config = config @@ -577,9 +577,7 @@ def _migrate_table_to_autoscale_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -615,7 +613,8 @@ def migrate_table_to_autoscale( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_table_to_autoscale_initial( resource_group_name=resource_group_name, @@ -676,9 +675,7 @@ def _migrate_table_to_manual_throughput_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseUpdatedFormatException(self._deserialize, response) deserialized = None @@ -714,7 +711,8 @@ def migrate_table_to_manual_throughput( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.ThroughputSettingsGetResults]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseUpdatedFormatException` """ raw_result = self._migrate_table_to_manual_throughput_initial( resource_group_name=resource_group_name, diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py index 20cee28211d4..24a18964e554 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py @@ -9,5 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "4.0.0" - +VERSION = "3.1.0" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml index 84ca399bee12..4604da20415e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml +++ b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml @@ -9,12 +9,13 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/spycosmosdbx11427b100e?api-version=2021-03-01-preview + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/spycosmosdbx11427b100e?api-version=2021-03-15 response: body: string: '' @@ -24,7 +25,7 @@ interactions: content-length: - '148' date: - - Mon, 01 Mar 2021 06:48:05 GMT + - Wed, 07 Apr 2021 02:00:52 GMT pragma: - no-cache server: @@ -38,8 +39,7 @@ interactions: message: NotFound - request: body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus", - "failoverPriority": 0}], "databaseAccountOfferType": "Standard", "createMode": - "Default"}}' + "failoverPriority": 0}], "databaseAccountOfferType": "Standard"}}' headers: Accept: - application/json @@ -48,37 +48,38 @@ interactions: Connection: - keep-alive Content-Length: - - '169' + - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e","name":"spycosmosdbx11427b100e","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T06:48:16.142088Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"090e13fe-8b13-4253-bf67-dd4b20ef1752","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:00:56.9294754Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"98c1599f-3515-4e0f-a1b2-2989e250ebbc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0429251b-31b0-45c0-b739-99ce5d9029d8?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d08832f-6b1a-4e20-9568-cd0607044415?api-version=2021-03-15 cache-control: - no-store, no-cache content-length: - - '1882' + - '1887' content-type: - application/json date: - - Mon, 01 Mar 2021 06:48:20 GMT + - Wed, 07 Apr 2021 02:00:58 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e/operationResults/0429251b-31b0-45c0-b739-99ce5d9029d8?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e/operationResults/5d08832f-6b1a-4e20-9568-cd0607044415?api-version=2021-03-15 pragma: - no-cache server: @@ -108,10 +109,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0429251b-31b0-45c0-b739-99ce5d9029d8?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d08832f-6b1a-4e20-9568-cd0607044415?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -123,7 +125,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:48:53 GMT + - Wed, 07 Apr 2021 02:01:28 GMT pragma: - no-cache server: @@ -151,10 +153,99 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0429251b-31b0-45c0-b739-99ce5d9029d8?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d08832f-6b1a-4e20-9568-cd0607044415?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:01:59 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d08832f-6b1a-4e20-9568-cd0607044415?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:02:29 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5d08832f-6b1a-4e20-9568-cd0607044415?api-version=2021-03-15 response: body: string: '{"status":"Succeeded"}' @@ -166,7 +257,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:49:24 GMT + - Wed, 07 Apr 2021 02:02:59 GMT pragma: - no-cache server: @@ -194,27 +285,28 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx11427b100e","name":"spycosmosdbx11427b100e","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T06:49:09.7621814Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx11427b100e.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"090e13fe-8b13-4253-bf67-dd4b20ef1752","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:02:05.3496662Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx11427b100e.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"98c1599f-3515-4e0f-a1b2-2989e250ebbc","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx11427b100e-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx11427b100e-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx11427b100e-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx11427b100e-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2234' + - '2238' content-type: - application/json date: - - Mon, 01 Mar 2021 06:49:24 GMT + - Wed, 07 Apr 2021 02:02:59 GMT pragma: - no-cache server: diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml index 8a05ed5b446e..27ccfdf9e3c7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml +++ b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml @@ -1,8 +1,7 @@ interactions: - request: body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus", - "failoverPriority": 0}], "databaseAccountOfferType": "Standard", "createMode": - "Default"}}' + "failoverPriority": 0}], "databaseAccountOfferType": "Standard"}}' headers: Accept: - application/json @@ -11,37 +10,38 @@ interactions: Connection: - keep-alive Content-Length: - - '169' + - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d","name":"spydocumentdbx334268100d","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T06:49:43.6672672Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"298df872-3ec6-40c7-a3a8-39ca9ae27768","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:03:07.2215069Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"e42b5093-9b6c-4f24-9c30-20051cc7098e","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spydocumentdbx334268100d-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bbc4d8ba-3f27-4605-931f-2e1194764821?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c9ca8b70-3eb3-435a-828a-127c439da907?api-version=2021-03-15 cache-control: - no-store, no-cache content-length: - - '1895' + - '1899' content-type: - application/json date: - - Mon, 01 Mar 2021 06:49:48 GMT + - Wed, 07 Apr 2021 02:03:09 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d/operationResults/bbc4d8ba-3f27-4605-931f-2e1194764821?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d/operationResults/c9ca8b70-3eb3-435a-828a-127c439da907?api-version=2021-03-15 pragma: - no-cache server: @@ -71,10 +71,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bbc4d8ba-3f27-4605-931f-2e1194764821?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c9ca8b70-3eb3-435a-828a-127c439da907?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -86,7 +87,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:50:20 GMT + - Wed, 07 Apr 2021 02:03:40 GMT pragma: - no-cache server: @@ -114,10 +115,55 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/bbc4d8ba-3f27-4605-931f-2e1194764821?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c9ca8b70-3eb3-435a-828a-127c439da907?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:04:10 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c9ca8b70-3eb3-435a-828a-127c439da907?api-version=2021-03-15 response: body: string: '{"status":"Succeeded"}' @@ -129,7 +175,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:50:50 GMT + - Wed, 07 Apr 2021 02:04:40 GMT pragma: - no-cache server: @@ -157,27 +203,28 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d","name":"spydocumentdbx334268100d","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T06:50:39.168309Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spydocumentdbx334268100d.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"298df872-3ec6-40c7-a3a8-39ca9ae27768","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:04:02.4105009Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spydocumentdbx334268100d.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"e42b5093-9b6c-4f24-9c30-20051cc7098e","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West US","documentEndpoint":"https://spydocumentdbx334268100d-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West US","documentEndpoint":"https://spydocumentdbx334268100d-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spydocumentdbx334268100d-westus","locationName":"West US","documentEndpoint":"https://spydocumentdbx334268100d-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spydocumentdbx334268100d-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2253' + - '2258' content-type: - application/json date: - - Mon, 01 Mar 2021 06:50:51 GMT + - Wed, 07 Apr 2021 02:04:40 GMT pragma: - no-cache server: @@ -207,18 +254,19 @@ interactions: Content-Length: - '0' User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/spydocumentdbx334268100d?api-version=2021-03-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 cache-control: - no-store, no-cache content-length: @@ -226,9 +274,9 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:50:57 GMT + - Wed, 07 Apr 2021 02:04:42 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationResults/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationResults/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 pragma: - no-cache server: @@ -254,10 +302,187 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:05:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:05:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:06:12 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:06:42 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -269,7 +494,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:51:29 GMT + - Wed, 07 Apr 2021 02:07:12 GMT pragma: - no-cache server: @@ -297,10 +522,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -312,7 +538,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:51:59 GMT + - Wed, 07 Apr 2021 02:07:42 GMT pragma: - no-cache server: @@ -340,10 +566,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -355,7 +582,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:52:29 GMT + - Wed, 07 Apr 2021 02:08:12 GMT pragma: - no-cache server: @@ -383,10 +610,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -398,7 +626,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:53:00 GMT + - Wed, 07 Apr 2021 02:08:42 GMT pragma: - no-cache server: @@ -426,10 +654,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -441,7 +670,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:53:31 GMT + - Wed, 07 Apr 2021 02:09:13 GMT pragma: - no-cache server: @@ -469,10 +698,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -484,7 +714,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:54:01 GMT + - Wed, 07 Apr 2021 02:09:43 GMT pragma: - no-cache server: @@ -512,10 +742,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -527,7 +758,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:54:31 GMT + - Wed, 07 Apr 2021 02:10:13 GMT pragma: - no-cache server: @@ -555,10 +786,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -570,7 +802,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:55:02 GMT + - Wed, 07 Apr 2021 02:10:43 GMT pragma: - no-cache server: @@ -598,10 +830,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -613,7 +846,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:55:32 GMT + - Wed, 07 Apr 2021 02:11:13 GMT pragma: - no-cache server: @@ -641,10 +874,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -656,7 +890,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:56:02 GMT + - Wed, 07 Apr 2021 02:11:43 GMT pragma: - no-cache server: @@ -684,10 +918,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -699,7 +934,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:56:32 GMT + - Wed, 07 Apr 2021 02:12:14 GMT pragma: - no-cache server: @@ -727,10 +962,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -742,7 +978,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:57:03 GMT + - Wed, 07 Apr 2021 02:12:44 GMT pragma: - no-cache server: @@ -770,10 +1006,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -785,7 +1022,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:57:34 GMT + - Wed, 07 Apr 2021 02:13:14 GMT pragma: - no-cache server: @@ -813,10 +1050,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -828,7 +1066,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:58:05 GMT + - Wed, 07 Apr 2021 02:13:44 GMT pragma: - no-cache server: @@ -856,10 +1094,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -871,7 +1110,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:58:35 GMT + - Wed, 07 Apr 2021 02:14:14 GMT pragma: - no-cache server: @@ -899,10 +1138,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/5a195c7f-2364-4567-acd2-108b7f4c0173?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/e3f4e964-54d7-495f-8a9a-c5357c32ad3a?api-version=2021-03-15 response: body: string: '{"status":"Succeeded"}' @@ -914,7 +1154,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 06:59:06 GMT + - Wed, 07 Apr 2021 02:14:44 GMT pragma: - no-cache server: diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml index 5588fbf53c50..c32823a66592 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml +++ b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml @@ -1,8 +1,7 @@ interactions: - request: body: '{"location": "westus", "properties": {"locations": [{"locationName": "westus", - "failoverPriority": 0}], "databaseAccountOfferType": "Standard", "createMode": - "Default"}}' + "failoverPriority": 0}], "databaseAccountOfferType": "Standard"}}' headers: Accept: - application/json @@ -11,37 +10,38 @@ interactions: Connection: - keep-alive Content-Length: - - '169' + - '144' Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9","name":"spycosmosdbx22640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T06:59:25.3755475Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"d5f15404-902e-4900-b48f-0142ea543325","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:14:51.9487489Z"},"properties":{"provisioningState":"Creating","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"35e3ef3d-fc8e-4e42-a1f4-cde23f9d90b1","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abf7b455-a227-43c9-912f-14d91f5b9af7?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abcb3432-fb00-4999-9f95-512546962b7d?api-version=2021-03-15 cache-control: - no-store, no-cache content-length: - - '1885' + - '1889' content-type: - application/json date: - - Mon, 01 Mar 2021 06:59:30 GMT + - Wed, 07 Apr 2021 02:14:53 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/operationResults/abf7b455-a227-43c9-912f-14d91f5b9af7?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/operationResults/abcb3432-fb00-4999-9f95-512546962b7d?api-version=2021-03-15 pragma: - no-cache server: @@ -57,7 +57,51 @@ interactions: x-ms-gatewayversion: - version=2.11.0 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' + status: + code: 200 + message: Ok +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abcb3432-fb00-4999-9f95-512546962b7d?api-version=2021-03-15 + response: + body: + string: '{"status":"Dequeued"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '21' + content-type: + - application/json + date: + - Wed, 07 Apr 2021 02:15:24 GMT + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-gatewayversion: + - version=2.11.0 status: code: 200 message: Ok @@ -71,10 +115,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abf7b455-a227-43c9-912f-14d91f5b9af7?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abcb3432-fb00-4999-9f95-512546962b7d?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -86,7 +131,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:00:02 GMT + - Wed, 07 Apr 2021 02:15:54 GMT pragma: - no-cache server: @@ -114,10 +159,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abf7b455-a227-43c9-912f-14d91f5b9af7?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abcb3432-fb00-4999-9f95-512546962b7d?api-version=2021-03-15 response: body: string: '{"status":"Dequeued"}' @@ -129,7 +175,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:00:32 GMT + - Wed, 07 Apr 2021 02:16:24 GMT pragma: - no-cache server: @@ -157,10 +203,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abf7b455-a227-43c9-912f-14d91f5b9af7?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/abcb3432-fb00-4999-9f95-512546962b7d?api-version=2021-03-15 response: body: string: '{"status":"Succeeded"}' @@ -172,7 +219,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:04 GMT + - Wed, 07 Apr 2021 02:16:54 GMT pragma: - no-cache server: @@ -200,27 +247,28 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9","name":"spycosmosdbx22640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T07:00:16.4152386Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"d5f15404-902e-4900-b48f-0142ea543325","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:16:05.173789Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"35e3ef3d-fc8e-4e42-a1f4-cde23f9d90b1","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2236' + - '2239' content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:04 GMT + - Wed, 07 Apr 2021 02:16:54 GMT pragma: - no-cache server: @@ -248,29 +296,30 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9?api-version=2021-03-15 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9","name":"spycosmosdbx22640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T07:00:16.4152386Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"d5f15404-902e-4900-b48f-0142ea543325","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:16:05.173789Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"35e3ef3d-fc8e-4e42-a1f4-cde23f9d90b1","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}' headers: cache-control: - no-store, no-cache content-length: - - '2236' + - '2239' content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:05 GMT + - Wed, 07 Apr 2021 02:16:55 GMT pragma: - no-cache server: @@ -298,29 +347,30 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-03-15 response: body: string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9","name":"spycosmosdbx22640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T07:00:16.4152386Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"d5f15404-902e-4900-b48f-0142ea543325","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:16:05.173789Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"35e3ef3d-fc8e-4e42-a1f4-cde23f9d90b1","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}]}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}]}' headers: cache-control: - no-store, no-cache content-length: - - '2248' + - '2251' content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:05 GMT + - Wed, 07 Apr 2021 02:16:55 GMT pragma: - no-cache server: @@ -348,29 +398,30 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-03-15 response: body: string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9","name":"spycosmosdbx22640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-03-01T07:00:16.4152386Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"d5f15404-902e-4900-b48f-0142ea543325","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"systemData":{"createdAt":"2021-04-07T02:16:05.173789Z"},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://spycosmosdbx22640310f9.documents.azure.com:443/","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"enableAnalyticalStorage":false,"instanceId":"35e3ef3d-fc8e-4e42-a1f4-cde23f9d90b1","createMode":"Default","databaseAccountOfferType":"Standard","defaultIdentity":"FirstPartyIdentity","networkAclBypass":"None","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West US","documentEndpoint":"https://spycosmosdbx22640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"spycosmosdbx22640310f9-westus","locationName":"West - US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":1}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}]}' + US","failoverPriority":0}],"cors":[],"capabilities":[],"ipRules":[],"backupPolicy":{"type":"Periodic","periodicModeProperties":{"backupIntervalInMinutes":240,"backupRetentionIntervalInHours":8,"backupStorageRedundancy":"Geo"}},"networkAclBypassResourceIds":[]},"identity":{"type":"None"}}]}' headers: cache-control: - no-store, no-cache content-length: - - '2248' + - '2251' content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:06 GMT + - Wed, 07 Apr 2021 02:16:55 GMT pragma: - no-cache server: @@ -402,18 +453,19 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/failoverPriorityChange?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/failoverPriorityChange?api-version=2021-03-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04171b07-82aa-4573-854b-f41c89f34c9e?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/46d83383-d237-4889-afbf-d0fa883c7ce2?api-version=2021-03-15 cache-control: - no-store, no-cache content-length: @@ -421,9 +473,9 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:10 GMT + - Wed, 07 Apr 2021 02:16:56 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/failoverPriorityChange/operationResults/04171b07-82aa-4573-854b-f41c89f34c9e?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/failoverPriorityChange/operationResults/46d83383-d237-4889-afbf-d0fa883c7ce2?api-version=2021-03-15 pragma: - no-cache server: @@ -449,10 +501,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/04171b07-82aa-4573-854b-f41c89f34c9e?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/46d83383-d237-4889-afbf-d0fa883c7ce2?api-version=2021-03-15 response: body: string: '{"status":"Succeeded"}' @@ -464,7 +517,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:43 GMT + - Wed, 07 Apr 2021 02:17:26 GMT pragma: - no-cache server: @@ -494,15 +547,16 @@ interactions: Content-Length: - '0' User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/listKeys?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/listKeys?api-version=2021-03-15 response: body: - string: '{"primaryMasterKey":"cv67T7uQJU0KQOurwbJcClT7kjU72HHXJDtqOK2E5bll1pDbuzVAfpz4T3YQWJTT1y7X8MTR8147ro2Ul5QAQA==","secondaryMasterKey":"LFSEumpBwPvsqED2fVXcrfyG8IZEzzkRW3MYpHIXhgYWFKPOC8soaXKq9oXcxM8nUNS2QeOPODTMdxZRsLF2vg==","primaryReadonlyMasterKey":"Lzjlm8KFr9xWEMgGKIzoZxJjwfe6V7hKftA2FHAHKiEkdWviEn0rVREYSKljNkOUwJhrnmH0CS3NjK2oOrX69g==","secondaryReadonlyMasterKey":"n3qypCqfBiGeJT9aBvYwPE2ZogtbhMu9VTKn7sNGDd8Gv9o5PTUuxzKSfGyBxX0H9UV2fZDGAWwcHHFk5gYxAw=="}' + string: '{"primaryMasterKey":"yxJE8UmTPRoXnwUhxEYVZ9M7KYQoi6gsDlKx6YUsvKRXyX7AcqQSmZCHszogK8VZxOLDrj7IMDyujj6D6DerIg==","secondaryMasterKey":"RbT6kOpJ9MTvM4LhaSXIMJ19EOnAHpiyvkbv86unAjcEHja4wMVEusQuEBsFJkbYkgpSYth0AR01FYOvO80fEA==","primaryReadonlyMasterKey":"GG4bYSV7fV5mQODDcG28BOBQSaShxwW1AMQ9HbNfByaBKoHf7U1AeQ09vO46OVKlaNhzCasblBLY87dpQMyCYQ==","secondaryReadonlyMasterKey":"vNykUwfAIaxR1IFOoPzuvpwi3y5SKUp2E2OJi7a7fisqc9EWpHaz6Z2kb6WnxQC7vnT8jV0J2XrtacpvZOuzgA=="}' headers: cache-control: - no-store, no-cache @@ -511,7 +565,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:43 GMT + - Wed, 07 Apr 2021 02:17:26 GMT pragma: - no-cache server: @@ -543,15 +597,16 @@ interactions: Content-Length: - '0' User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/readonlykeys?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/readonlykeys?api-version=2021-03-15 response: body: - string: '{"primaryReadonlyMasterKey":"Lzjlm8KFr9xWEMgGKIzoZxJjwfe6V7hKftA2FHAHKiEkdWviEn0rVREYSKljNkOUwJhrnmH0CS3NjK2oOrX69g==","secondaryReadonlyMasterKey":"n3qypCqfBiGeJT9aBvYwPE2ZogtbhMu9VTKn7sNGDd8Gv9o5PTUuxzKSfGyBxX0H9UV2fZDGAWwcHHFk5gYxAw=="}' + string: '{"primaryReadonlyMasterKey":"GG4bYSV7fV5mQODDcG28BOBQSaShxwW1AMQ9HbNfByaBKoHf7U1AeQ09vO46OVKlaNhzCasblBLY87dpQMyCYQ==","secondaryReadonlyMasterKey":"vNykUwfAIaxR1IFOoPzuvpwi3y5SKUp2E2OJi7a7fisqc9EWpHaz6Z2kb6WnxQC7vnT8jV0J2XrtacpvZOuzgA=="}' headers: cache-control: - no-store, no-cache @@ -560,7 +615,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:43 GMT + - Wed, 07 Apr 2021 02:17:26 GMT pragma: - no-cache server: @@ -594,18 +649,19 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/regenerateKey?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/regenerateKey?api-version=2021-03-15 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/f5b0feac-6470-4e8f-9749-36ab10b3e771?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/82e42a14-fbc4-4a50-8e5a-2e4b850c843d?api-version=2021-03-15 cache-control: - no-store, no-cache content-length: @@ -613,9 +669,9 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:01:47 GMT + - Wed, 07 Apr 2021 02:17:28 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/regenerateKey/operationResults/f5b0feac-6470-4e8f-9749-36ab10b3e771?api-version=2021-03-01-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/spycosmosdbx22640310f9/regenerateKey/operationResults/82e42a14-fbc4-4a50-8e5a-2e4b850c843d?api-version=2021-03-15 pragma: - no-cache server: @@ -641,10 +697,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.10 msrest_azure/0.6.2 azure-mgmt-cosmosdb/4.0.0 Azure-SDK-For-Python + - python/3.8.8 (Linux-5.4.0-1043-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 msrest_azure/0.6.4 + azure-mgmt-cosmosdb/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/f5b0feac-6470-4e8f-9749-36ab10b3e771?api-version=2021-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/82e42a14-fbc4-4a50-8e5a-2e4b850c843d?api-version=2021-03-15 response: body: string: '{"status":"Succeeded"}' @@ -656,7 +713,7 @@ interactions: content-type: - application/json date: - - Mon, 01 Mar 2021 07:02:20 GMT + - Wed, 07 Apr 2021 02:17:58 GMT pragma: - no-cache server: