Skip to content

Commit cb97ec0

Browse files
[AutoRelease] t2-cosmosdb-2023-12-12-16204(can only be merged by SDK owner) (#33466)
* code and test * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent d422d09 commit cb97ec0

File tree

235 files changed

+1004
-696
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+1004
-696
lines changed

sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Release History
22

3+
## 9.4.0 (2023-12-19)
4+
5+
### Features Added
6+
7+
- Model GremlinDatabaseGetPropertiesResource has a new parameter create_mode
8+
- Model GremlinDatabaseGetPropertiesResource has a new parameter restore_parameters
9+
- Model GremlinDatabaseResource has a new parameter create_mode
10+
- Model GremlinDatabaseResource has a new parameter restore_parameters
11+
- Model GremlinGraphGetPropertiesResource has a new parameter create_mode
12+
- Model GremlinGraphGetPropertiesResource has a new parameter restore_parameters
13+
- Model GremlinGraphResource has a new parameter create_mode
14+
- Model GremlinGraphResource has a new parameter restore_parameters
15+
- Model MongoDBCollectionGetPropertiesResource has a new parameter create_mode
16+
- Model MongoDBCollectionGetPropertiesResource has a new parameter restore_parameters
17+
- Model MongoDBCollectionResource has a new parameter create_mode
18+
- Model MongoDBCollectionResource has a new parameter restore_parameters
19+
- Model MongoDBDatabaseGetPropertiesResource has a new parameter create_mode
20+
- Model MongoDBDatabaseGetPropertiesResource has a new parameter restore_parameters
21+
- Model MongoDBDatabaseResource has a new parameter create_mode
22+
- Model MongoDBDatabaseResource has a new parameter restore_parameters
23+
- Model RestorableGremlinDatabasePropertiesResource has a new parameter can_undelete
24+
- Model RestorableGremlinDatabasePropertiesResource has a new parameter can_undelete_reason
25+
- Model RestorableGremlinGraphPropertiesResource has a new parameter can_undelete
26+
- Model RestorableGremlinGraphPropertiesResource has a new parameter can_undelete_reason
27+
- Model RestorableMongodbCollectionPropertiesResource has a new parameter can_undelete
28+
- Model RestorableMongodbCollectionPropertiesResource has a new parameter can_undelete_reason
29+
- Model RestorableMongodbDatabasePropertiesResource has a new parameter can_undelete
30+
- Model RestorableMongodbDatabasePropertiesResource has a new parameter can_undelete_reason
31+
- Model RestorableSqlContainerPropertiesResource has a new parameter can_undelete
32+
- Model RestorableSqlContainerPropertiesResource has a new parameter can_undelete_reason
33+
- Model RestorableSqlContainerPropertiesResourceContainer has a new parameter computed_properties
34+
- Model RestorableSqlContainerPropertiesResourceContainer has a new parameter create_mode
35+
- Model RestorableSqlContainerPropertiesResourceContainer has a new parameter restore_parameters
36+
- Model RestorableSqlDatabasePropertiesResource has a new parameter can_undelete
37+
- Model RestorableSqlDatabasePropertiesResource has a new parameter can_undelete_reason
38+
- Model RestorableSqlDatabasePropertiesResourceDatabase has a new parameter create_mode
39+
- Model RestorableSqlDatabasePropertiesResourceDatabase has a new parameter restore_parameters
40+
- Model RestorableTablePropertiesResource has a new parameter can_undelete
41+
- Model RestorableTablePropertiesResource has a new parameter can_undelete_reason
42+
- Model SqlContainerGetPropertiesResource has a new parameter computed_properties
43+
- Model SqlContainerGetPropertiesResource has a new parameter create_mode
44+
- Model SqlContainerGetPropertiesResource has a new parameter restore_parameters
45+
- Model SqlContainerResource has a new parameter computed_properties
46+
- Model SqlContainerResource has a new parameter create_mode
47+
- Model SqlContainerResource has a new parameter restore_parameters
48+
- Model SqlDatabaseGetPropertiesResource has a new parameter create_mode
49+
- Model SqlDatabaseGetPropertiesResource has a new parameter restore_parameters
50+
- Model SqlDatabaseResource has a new parameter create_mode
51+
- Model SqlDatabaseResource has a new parameter restore_parameters
52+
- Model TableGetPropertiesResource has a new parameter create_mode
53+
- Model TableGetPropertiesResource has a new parameter restore_parameters
54+
- Model TableResource has a new parameter create_mode
55+
- Model TableResource has a new parameter restore_parameters
56+
357
## 9.3.0 (2023-10-23)
458

559
### Features Added

sdk/cosmos/azure-mgmt-cosmosdb/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"commit": "24c9b5a8982cb081662b27ef8ab93da3389b0160",
2+
"commit": "583a4974607e00e1da26915562aeafb4bad079de",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.7",
55
"use": [

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: The ID of the target subscription. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-09-15". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-11-15". Note that overriding this
3333
default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-09-15")
39+
api_version: str = kwargs.pop("api_version", "2023-11-15")
4040

4141
if credential is None:
4242
raise ValueError("Parameter 'credential' must not be None.")

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
159159
:type subscription_id: str
160160
:param base_url: Service URL. Default value is "https://management.azure.com".
161161
:type base_url: str
162-
:keyword api_version: Api Version. Default value is "2023-09-15". Note that overriding this
162+
:keyword api_version: Api Version. Default value is "2023-11-15". Note that overriding this
163163
default value may result in unsupported behavior.
164164
:paramtype api_version: str
165165
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "9.3.0"
9+
VERSION = "9.4.0"

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class CosmosDBManagementClientConfiguration(Configuration): # pylint: disable=t
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: The ID of the target subscription. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-09-15". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-11-15". Note that overriding this
3333
default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

3737
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
3838
super(CosmosDBManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-09-15")
39+
api_version: str = kwargs.pop("api_version", "2023-11-15")
4040

4141
if credential is None:
4242
raise ValueError("Parameter 'credential' must not be None.")

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
162162
:type subscription_id: str
163163
:param base_url: Service URL. Default value is "https://management.azure.com".
164164
:type base_url: str
165-
:keyword api_version: Api Version. Default value is "2023-09-15". Note that overriding this
165+
:keyword api_version: Api Version. Default value is "2023-11-15". Note that overriding this
166166
default value may result in unsupported behavior.
167167
:paramtype api_version: str
168168
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
from ._models_py3 import CommandOutput
5454
from ._models_py3 import CommandPostBody
5555
from ._models_py3 import CompositePath
56+
from ._models_py3 import ComputedProperty
5657
from ._models_py3 import ConflictResolutionPolicy
5758
from ._models_py3 import ConnectionError
5859
from ._models_py3 import ConsistencyPolicy
@@ -177,6 +178,7 @@
177178
from ._models_py3 import RegionForOnlineOffline
178179
from ._models_py3 import RegionalServiceResource
179180
from ._models_py3 import Resource
181+
from ._models_py3 import ResourceRestoreParameters
180182
from ._models_py3 import RestorableDatabaseAccountGetResult
181183
from ._models_py3 import RestorableDatabaseAccountsListResult
182184
from ._models_py3 import RestorableGremlinDatabaseGetResult
@@ -212,6 +214,7 @@
212214
from ._models_py3 import RestorableTableResourcesListResult
213215
from ._models_py3 import RestorableTablesListResult
214216
from ._models_py3 import RestoreParameters
217+
from ._models_py3 import RestoreParametersBase
215218
from ._models_py3 import Role
216219
from ._models_py3 import SeedNode
217220
from ._models_py3 import ServiceResource
@@ -286,7 +289,6 @@
286289
from ._cosmos_db_management_client_enums import ContinuousTier
287290
from ._cosmos_db_management_client_enums import CreateMode
288291
from ._cosmos_db_management_client_enums import CreatedByType
289-
from ._cosmos_db_management_client_enums import CustomerManagedKeyStatus
290292
from ._cosmos_db_management_client_enums import DataType
291293
from ._cosmos_db_management_client_enums import DatabaseAccountKind
292294
from ._cosmos_db_management_client_enums import DefaultConsistencyLevel
@@ -371,6 +373,7 @@
371373
"CommandOutput",
372374
"CommandPostBody",
373375
"CompositePath",
376+
"ComputedProperty",
374377
"ConflictResolutionPolicy",
375378
"ConnectionError",
376379
"ConsistencyPolicy",
@@ -495,6 +498,7 @@
495498
"RegionForOnlineOffline",
496499
"RegionalServiceResource",
497500
"Resource",
501+
"ResourceRestoreParameters",
498502
"RestorableDatabaseAccountGetResult",
499503
"RestorableDatabaseAccountsListResult",
500504
"RestorableGremlinDatabaseGetResult",
@@ -530,6 +534,7 @@
530534
"RestorableTableResourcesListResult",
531535
"RestorableTablesListResult",
532536
"RestoreParameters",
537+
"RestoreParametersBase",
533538
"Role",
534539
"SeedNode",
535540
"ServiceResource",
@@ -603,7 +608,6 @@
603608
"ContinuousTier",
604609
"CreateMode",
605610
"CreatedByType",
606-
"CustomerManagedKeyStatus",
607611
"DataType",
608612
"DatabaseAccountKind",
609613
"DefaultConsistencyLevel",

sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,6 @@ class CreateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
117117
RESTORE = "Restore"
118118

119119

120-
class CustomerManagedKeyStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
121-
"""Indicates the status of the Customer Managed Key feature on the account. In case there are
122-
errors, the property provides troubleshooting guidance.
123-
"""
124-
125-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_AZURE_COSMOS_DB_SERVICE_IS_UNABLE_TO_OBTAIN_THE_AAD_AUTHENTICATION_TOKEN_FOR_THE_ACCOUNT_S_DEFAULT_IDENTITY_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_AZURE_ACTIVE_DIRECTORY_TOKEN_ACQUISITION_ERROR4000_ = "Access to your account is currently revoked because the Azure Cosmos DB service is unable to obtain the AAD authentication token for the account's default identity; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-active-directory-token-acquisition-error (4000)."
126-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_AZURE_COSMOS_DB_ACCOUNT_S_KEY_VAULT_KEY_URI_DOES_NOT_FOLLOW_THE_EXPECTED_FORMAT_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_IMPROPER_SYNTAX_DETECTED_ON_THE_KEY_VAULT_URI_PROPERTY4006_ = "Access to your account is currently revoked because the Azure Cosmos DB account's key vault key URI does not follow the expected format; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#improper-syntax-detected-on-the-key-vault-uri-property (4006)."
127-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_CURRENT_DEFAULT_IDENTITY_NO_LONGER_HAS_PERMISSION_TO_THE_ASSOCIATED_KEY_VAULT_KEY_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_DEFAULT_IDENTITY_IS_UNAUTHORIZED_TO_ACCESS_THE_AZURE_KEY_VAULT_KEY4002_ = "Access to your account is currently revoked because the current default identity no longer has permission to the associated Key Vault key; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#default-identity-is-unauthorized-to-access-the-azure-key-vault-key (4002)."
128-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_AZURE_KEY_VAULT_DNS_NAME_SPECIFIED_BY_THE_ACCOUNT_S_KEYVAULTKEYURI_PROPERTY_COULD_NOT_BE_RESOLVED_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_UNABLE_TO_RESOLVE_THE_KEY_VAULTS_DNS4009_ = "Access to your account is currently revoked because the Azure Key Vault DNS name specified by the account's keyvaultkeyuri property could not be resolved; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#unable-to-resolve-the-key-vaults-dns (4009)."
129-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_CORRESPONDENT_KEY_IS_NOT_FOUND_ON_THE_SPECIFIED_KEY_VAULT_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_AZURE_KEY_VAULT_RESOURCE_NOT_FOUND4003_ = "Access to your account is currently revoked because the correspondent key is not found on the specified Key Vault; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4003)."
130-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_AZURE_COSMOS_DB_SERVICE_IS_UNABLE_TO_WRAP_OR_UNWRAP_THE_KEY_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_INTERNAL_UNWRAPPING_PROCEDURE_ERROR4005_ = "Access to your account is currently revoked because the Azure Cosmos DB service is unable to wrap or unwrap the key; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#internal-unwrapping-procedure-error (4005)."
131-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_AZURE_COSMOS_DB_ACCOUNT_HAS_AN_UNDEFINED_DEFAULT_IDENTITY_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_INVALID_AZURE_COSMOS_DB_DEFAULT_IDENTITY4015_ = "Access to your account is currently revoked because the Azure Cosmos DB account has an undefined default identity; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#invalid-azure-cosmos-db-default-identity (4015)."
132-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_ACCESS_RULES_ARE_BLOCKING_OUTBOUND_REQUESTS_TO_THE_AZURE_KEY_VAULT_SERVICE_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE4016_ = "Access to your account is currently revoked because the access rules are blocking outbound requests to the Azure Key Vault service; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide (4016)."
133-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_BECAUSE_THE_CORRESPONDENT_AZURE_KEY_VAULT_WAS_NOT_FOUND_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE_AZURE_KEY_VAULT_RESOURCE_NOT_FOUND4017_ = "Access to your account is currently revoked because the correspondent Azure Key Vault was not found; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-key-vault-resource-not-found (4017)."
134-
ACCESS_TO_YOUR_ACCOUNT_IS_CURRENTLY_REVOKED_FOR_MORE_DETAILS_ABOUT_THIS_ERROR_AND_HOW_TO_RESTORE_ACCESS_TO_YOUR_ACCOUNT_PLEASE_VISIT_HTTPS_LEARN_MICROSOFT_COM_EN_US_AZURE_COSMOS_DB_CMK_TROUBLESHOOTING_GUIDE = "Access to your account is currently revoked; for more details about this error and how to restore access to your account please visit https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide"
135-
ACCESS_TO_THE_CONFIGURED_CUSTOMER_MANAGED_KEY_CONFIRMED_ = (
136-
"Access to the configured customer managed key confirmed."
137-
)
138-
139-
140120
class DatabaseAccountKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
141121
"""Indicates the type of database account. This can only be set at database account creation."""
142122

@@ -271,6 +251,7 @@ class OperationType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
271251
CREATE = "Create"
272252
REPLACE = "Replace"
273253
DELETE = "Delete"
254+
RECREATE = "Recreate"
274255
SYSTEM_OPERATION = "SystemOperation"
275256

276257

0 commit comments

Comments
 (0)