Skip to content

Commit bc89d9d

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] t2-cosmosdb-2023-04-29-47469(can only be merged by SDK owner) (Azure#30154)
* code and test * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent 708f13c commit bc89d9d

File tree

245 files changed

+494
-404
lines changed

Some content is hidden

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

245 files changed

+494
-404
lines changed

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

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

3+
## 9.2.0 (2023-05-08)
4+
5+
### Features Added
6+
7+
- Model ContinuousModeBackupPolicy has a new parameter continuous_mode_properties
8+
- Model RestorableDatabaseAccountGetResult has a new parameter oldest_restorable_time
9+
- Model ThroughputSettingsGetPropertiesResource has a new parameter instant_maximum_throughput
10+
- Model ThroughputSettingsGetPropertiesResource has a new parameter soft_allowed_maximum_throughput
11+
- Model ThroughputSettingsResource has a new parameter instant_maximum_throughput
12+
- Model ThroughputSettingsResource has a new parameter soft_allowed_maximum_throughput
13+
- Added new enum type `ContinuousTier`
14+
- Enum `PublicNetworkAccess` has a new value `SECURED_BY_PERIMETER`
15+
316
## 9.1.0 (2023-04-21)
417

518
### 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": "e716082ac474f182e2220e4f38f1d6191e7636cf",
2+
"commit": "be4adb7c2681e82c81c25902bb5e4964229a79a2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
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-03-15". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-04-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-03-15")
39+
api_version: str = kwargs.pop("api_version", "2023-04-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-03-15". Note that overriding this
162+
:keyword api_version: Api Version. Default value is "2023-04-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.1.0"
9+
VERSION = "9.2.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-03-15". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-04-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-03-15")
39+
api_version: str = kwargs.pop("api_version", "2023-04-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-03-15". Note that overriding this
165+
:keyword api_version: Api Version. Default value is "2023-04-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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
from ._models_py3 import ContinuousBackupInformation
6161
from ._models_py3 import ContinuousBackupRestoreLocation
6262
from ._models_py3 import ContinuousModeBackupPolicy
63+
from ._models_py3 import ContinuousModeProperties
6364
from ._models_py3 import CorsPolicy
6465
from ._models_py3 import CreateUpdateOptions
6566
from ._models_py3 import DataCenterResource
@@ -282,6 +283,7 @@
282283
from ._cosmos_db_management_client_enums import ConflictResolutionMode
283284
from ._cosmos_db_management_client_enums import ConnectionState
284285
from ._cosmos_db_management_client_enums import ConnectorOffer
286+
from ._cosmos_db_management_client_enums import ContinuousTier
285287
from ._cosmos_db_management_client_enums import CreateMode
286288
from ._cosmos_db_management_client_enums import CreatedByType
287289
from ._cosmos_db_management_client_enums import DataType
@@ -375,6 +377,7 @@
375377
"ContinuousBackupInformation",
376378
"ContinuousBackupRestoreLocation",
377379
"ContinuousModeBackupPolicy",
380+
"ContinuousModeProperties",
378381
"CorsPolicy",
379382
"CreateUpdateOptions",
380383
"DataCenterResource",
@@ -596,6 +599,7 @@
596599
"ConflictResolutionMode",
597600
"ConnectionState",
598601
"ConnectorOffer",
602+
"ContinuousTier",
599603
"CreateMode",
600604
"CreatedByType",
601605
"DataType",

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ class ConnectorOffer(str, Enum, metaclass=CaseInsensitiveEnumMeta):
9494
SMALL = "Small"
9595

9696

97+
class ContinuousTier(str, Enum, metaclass=CaseInsensitiveEnumMeta):
98+
"""Enum to indicate type of Continuous backup tier."""
99+
100+
CONTINUOUS7_DAYS = "Continuous7Days"
101+
CONTINUOUS30_DAYS = "Continuous30Days"
102+
103+
97104
class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
98105
"""The type of identity that created the resource."""
99106

@@ -273,6 +280,7 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta):
273280

274281
ENABLED = "Enabled"
275282
DISABLED = "Disabled"
283+
SECURED_BY_PERIMETER = "SecuredByPerimeter"
276284

277285

278286
class ResourceIdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta):

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

Lines changed: 72 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,6 +2643,8 @@ class ContinuousModeBackupPolicy(BackupPolicy):
26432643
:ivar migration_state: The object representing the state of the migration between the backup
26442644
policies.
26452645
:vartype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState
2646+
:ivar continuous_mode_properties: Configuration values for continuous mode backup.
2647+
:vartype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties
26462648
"""
26472649

26482650
_validation = {
@@ -2652,18 +2654,48 @@ class ContinuousModeBackupPolicy(BackupPolicy):
26522654
_attribute_map = {
26532655
"type": {"key": "type", "type": "str"},
26542656
"migration_state": {"key": "migrationState", "type": "BackupPolicyMigrationState"},
2657+
"continuous_mode_properties": {"key": "continuousModeProperties", "type": "ContinuousModeProperties"},
26552658
}
26562659

26572660
def __init__(
2658-
self, *, migration_state: Optional["_models.BackupPolicyMigrationState"] = None, **kwargs: Any
2661+
self,
2662+
*,
2663+
migration_state: Optional["_models.BackupPolicyMigrationState"] = None,
2664+
continuous_mode_properties: Optional["_models.ContinuousModeProperties"] = None,
2665+
**kwargs: Any
26592666
) -> None:
26602667
"""
26612668
:keyword migration_state: The object representing the state of the migration between the backup
26622669
policies.
26632670
:paramtype migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState
2671+
:keyword continuous_mode_properties: Configuration values for continuous mode backup.
2672+
:paramtype continuous_mode_properties: ~azure.mgmt.cosmosdb.models.ContinuousModeProperties
26642673
"""
26652674
super().__init__(migration_state=migration_state, **kwargs)
26662675
self.type: str = "Continuous"
2676+
self.continuous_mode_properties = continuous_mode_properties
2677+
2678+
2679+
class ContinuousModeProperties(_serialization.Model):
2680+
"""Configuration values for periodic mode backup.
2681+
2682+
:ivar tier: Enum to indicate type of Continuous backup mode. Known values are:
2683+
"Continuous7Days" and "Continuous30Days".
2684+
:vartype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier
2685+
"""
2686+
2687+
_attribute_map = {
2688+
"tier": {"key": "tier", "type": "str"},
2689+
}
2690+
2691+
def __init__(self, *, tier: Optional[Union[str, "_models.ContinuousTier"]] = None, **kwargs: Any) -> None:
2692+
"""
2693+
:keyword tier: Enum to indicate type of Continuous backup mode. Known values are:
2694+
"Continuous7Days" and "Continuous30Days".
2695+
:paramtype tier: str or ~azure.mgmt.cosmosdb.models.ContinuousTier
2696+
"""
2697+
super().__init__(**kwargs)
2698+
self.tier = tier
26672699

26682700

26692701
class CorsPolicy(_serialization.Model):
@@ -2877,7 +2909,7 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): # pylint: d
28772909
"FirstPartyIdentity", "SystemAssignedIdentity" and more.
28782910
:vartype default_identity: str
28792911
:ivar public_network_access: Whether requests from Public Network are allowed. Known values
2880-
are: "Enabled" and "Disabled".
2912+
are: "Enabled", "Disabled", and "SecuredByPerimeter".
28812913
:vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess
28822914
:ivar enable_free_tier: Flag to indicate whether Free Tier is enabled.
28832915
:vartype enable_free_tier: bool
@@ -3069,7 +3101,7 @@ def __init__( # pylint: disable=too-many-locals
30693101
"FirstPartyIdentity", "SystemAssignedIdentity" and more.
30703102
:paramtype default_identity: str
30713103
:keyword public_network_access: Whether requests from Public Network are allowed. Known values
3072-
are: "Enabled" and "Disabled".
3104+
are: "Enabled", "Disabled", and "SecuredByPerimeter".
30733105
:paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess
30743106
:keyword enable_free_tier: Flag to indicate whether Free Tier is enabled.
30753107
:paramtype enable_free_tier: bool
@@ -3231,7 +3263,7 @@ class DatabaseAccountGetResults(ARMResourceProperties): # pylint: disable=too-m
32313263
"FirstPartyIdentity", "SystemAssignedIdentity" and more.
32323264
:vartype default_identity: str
32333265
:ivar public_network_access: Whether requests from Public Network are allowed. Known values
3234-
are: "Enabled" and "Disabled".
3266+
are: "Enabled", "Disabled", and "SecuredByPerimeter".
32353267
:vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess
32363268
:ivar enable_free_tier: Flag to indicate whether Free Tier is enabled.
32373269
:vartype enable_free_tier: bool
@@ -3437,7 +3469,7 @@ def __init__( # pylint: disable=too-many-locals
34373469
"FirstPartyIdentity", "SystemAssignedIdentity" and more.
34383470
:paramtype default_identity: str
34393471
:keyword public_network_access: Whether requests from Public Network are allowed. Known values
3440-
are: "Enabled" and "Disabled".
3472+
are: "Enabled", "Disabled", and "SecuredByPerimeter".
34413473
:paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess
34423474
:keyword enable_free_tier: Flag to indicate whether Free Tier is enabled.
34433475
:paramtype enable_free_tier: bool
@@ -3755,7 +3787,7 @@ class DatabaseAccountUpdateParameters(_serialization.Model): # pylint: disable=
37553787
"FirstPartyIdentity", "SystemAssignedIdentity" and more.
37563788
:vartype default_identity: str
37573789
:ivar public_network_access: Whether requests from Public Network are allowed. Known values
3758-
are: "Enabled" and "Disabled".
3790+
are: "Enabled", "Disabled", and "SecuredByPerimeter".
37593791
:vartype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess
37603792
:ivar enable_free_tier: Flag to indicate whether Free Tier is enabled.
37613793
:vartype enable_free_tier: bool
@@ -3921,7 +3953,7 @@ def __init__( # pylint: disable=too-many-locals
39213953
"FirstPartyIdentity", "SystemAssignedIdentity" and more.
39223954
:paramtype default_identity: str
39233955
:keyword public_network_access: Whether requests from Public Network are allowed. Known values
3924-
are: "Enabled" and "Disabled".
3956+
are: "Enabled", "Disabled", and "SecuredByPerimeter".
39253957
:paramtype public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess
39263958
:keyword enable_free_tier: Flag to indicate whether Free Tier is enabled.
39273959
:paramtype enable_free_tier: bool
@@ -8481,6 +8513,9 @@ class RestorableDatabaseAccountGetResult(_serialization.Model):
84818513
:ivar deletion_time: The time at which the restorable database account has been deleted
84828514
(ISO-8601 format).
84838515
:vartype deletion_time: ~datetime.datetime
8516+
:ivar oldest_restorable_time: The least recent time at which the database account can be
8517+
restored to (ISO-8601 format).
8518+
:vartype oldest_restorable_time: ~datetime.datetime
84848519
:ivar api_type: The API type of the restorable database account. Known values are: "MongoDB",
84858520
"Gremlin", "Cassandra", "Table", "Sql", and "GremlinV2".
84868521
:vartype api_type: str or ~azure.mgmt.cosmosdb.models.ApiType
@@ -8505,6 +8540,7 @@ class RestorableDatabaseAccountGetResult(_serialization.Model):
85058540
"account_name": {"key": "properties.accountName", "type": "str"},
85068541
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
85078542
"deletion_time": {"key": "properties.deletionTime", "type": "iso-8601"},
8543+
"oldest_restorable_time": {"key": "properties.oldestRestorableTime", "type": "iso-8601"},
85088544
"api_type": {"key": "properties.apiType", "type": "str"},
85098545
"restorable_locations": {"key": "properties.restorableLocations", "type": "[RestorableLocationResource]"},
85108546
}
@@ -8516,6 +8552,7 @@ def __init__(
85168552
account_name: Optional[str] = None,
85178553
creation_time: Optional[datetime.datetime] = None,
85188554
deletion_time: Optional[datetime.datetime] = None,
8555+
oldest_restorable_time: Optional[datetime.datetime] = None,
85198556
**kwargs: Any
85208557
) -> None:
85218558
"""
@@ -8528,6 +8565,9 @@ def __init__(
85288565
:keyword deletion_time: The time at which the restorable database account has been deleted
85298566
(ISO-8601 format).
85308567
:paramtype deletion_time: ~datetime.datetime
8568+
:keyword oldest_restorable_time: The least recent time at which the database account can be
8569+
restored to (ISO-8601 format).
8570+
:paramtype oldest_restorable_time: ~datetime.datetime
85318571
"""
85328572
super().__init__(**kwargs)
85338573
self.id = None
@@ -8537,6 +8577,7 @@ def __init__(
85378577
self.account_name = account_name
85388578
self.creation_time = creation_time
85398579
self.deletion_time = deletion_time
8580+
self.oldest_restorable_time = oldest_restorable_time
85408581
self.api_type = None
85418582
self.restorable_locations = None
85428583

@@ -12395,18 +12436,28 @@ class ThroughputSettingsResource(_serialization.Model):
1239512436
:vartype minimum_throughput: str
1239612437
:ivar offer_replace_pending: The throughput replace is pending.
1239712438
:vartype offer_replace_pending: str
12439+
:ivar instant_maximum_throughput: The offer throughput value to instantly scale up without
12440+
triggering splits.
12441+
:vartype instant_maximum_throughput: str
12442+
:ivar soft_allowed_maximum_throughput: The maximum throughput value or the maximum
12443+
maxThroughput value (for autoscale) that can be specified.
12444+
:vartype soft_allowed_maximum_throughput: str
1239812445
"""
1239912446

1240012447
_validation = {
1240112448
"minimum_throughput": {"readonly": True},
1240212449
"offer_replace_pending": {"readonly": True},
12450+
"instant_maximum_throughput": {"readonly": True},
12451+
"soft_allowed_maximum_throughput": {"readonly": True},
1240312452
}
1240412453

1240512454
_attribute_map = {
1240612455
"throughput": {"key": "throughput", "type": "int"},
1240712456
"autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettingsResource"},
1240812457
"minimum_throughput": {"key": "minimumThroughput", "type": "str"},
1240912458
"offer_replace_pending": {"key": "offerReplacePending", "type": "str"},
12459+
"instant_maximum_throughput": {"key": "instantMaximumThroughput", "type": "str"},
12460+
"soft_allowed_maximum_throughput": {"key": "softAllowedMaximumThroughput", "type": "str"},
1241012461
}
1241112462

1241212463
def __init__(
@@ -12429,6 +12480,8 @@ def __init__(
1242912480
self.autoscale_settings = autoscale_settings
1243012481
self.minimum_throughput = None
1243112482
self.offer_replace_pending = None
12483+
self.instant_maximum_throughput = None
12484+
self.soft_allowed_maximum_throughput = None
1243212485

1243312486

1243412487
class ThroughputSettingsGetPropertiesResource(ThroughputSettingsResource, ExtendedResourceProperties):
@@ -12453,6 +12506,12 @@ class ThroughputSettingsGetPropertiesResource(ThroughputSettingsResource, Extend
1245312506
:vartype minimum_throughput: str
1245412507
:ivar offer_replace_pending: The throughput replace is pending.
1245512508
:vartype offer_replace_pending: str
12509+
:ivar instant_maximum_throughput: The offer throughput value to instantly scale up without
12510+
triggering splits.
12511+
:vartype instant_maximum_throughput: str
12512+
:ivar soft_allowed_maximum_throughput: The maximum throughput value or the maximum
12513+
maxThroughput value (for autoscale) that can be specified.
12514+
:vartype soft_allowed_maximum_throughput: str
1245612515
"""
1245712516

1245812517
_validation = {
@@ -12461,6 +12520,8 @@ class ThroughputSettingsGetPropertiesResource(ThroughputSettingsResource, Extend
1246112520
"etag": {"readonly": True},
1246212521
"minimum_throughput": {"readonly": True},
1246312522
"offer_replace_pending": {"readonly": True},
12523+
"instant_maximum_throughput": {"readonly": True},
12524+
"soft_allowed_maximum_throughput": {"readonly": True},
1246412525
}
1246512526

1246612527
_attribute_map = {
@@ -12471,6 +12532,8 @@ class ThroughputSettingsGetPropertiesResource(ThroughputSettingsResource, Extend
1247112532
"autoscale_settings": {"key": "autoscaleSettings", "type": "AutoscaleSettingsResource"},
1247212533
"minimum_throughput": {"key": "minimumThroughput", "type": "str"},
1247312534
"offer_replace_pending": {"key": "offerReplacePending", "type": "str"},
12535+
"instant_maximum_throughput": {"key": "instantMaximumThroughput", "type": "str"},
12536+
"soft_allowed_maximum_throughput": {"key": "softAllowedMaximumThroughput", "type": "str"},
1247412537
}
1247512538

1247612539
def __init__(
@@ -12496,6 +12559,8 @@ def __init__(
1249612559
self.autoscale_settings = autoscale_settings
1249712560
self.minimum_throughput = None
1249812561
self.offer_replace_pending = None
12562+
self.instant_maximum_throughput = None
12563+
self.soft_allowed_maximum_throughput = None
1249912564

1250012565

1250112566
class ThroughputSettingsGetResults(ARMResourceProperties):

0 commit comments

Comments
 (0)