From 76ce6a9254bde718dfa28772b78f1aa3b0cebe91 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 5 Mar 2020 21:49:18 +0000 Subject: [PATCH] Generated from 0a95e56a2693de3539ef29e10463a2f967eb8dfe Include changes that got missed from 2020-03-01 --- .../azure/mgmt/cosmosdb/_configuration.py | 5 +- .../cosmosdb/_cosmos_db_management_client.py | 6 +- .../azure/mgmt/cosmosdb/models/__init__.py | 6 +- .../azure/mgmt/cosmosdb/models/_models.py | 110 ++++++++--------- .../azure/mgmt/cosmosdb/models/_models_py3.py | 114 +++++++++--------- 5 files changed, 125 insertions(+), 116 deletions(-) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py index bcd1a6c706ea..2bdf807a0821 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py @@ -29,12 +29,14 @@ class CosmosDBManagementClientConfiguration(AzureConfiguration): """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") + if subscription_id1 is None: + raise ValueError("Parameter 'subscription_id1' must not be None.") if not base_url: base_url = 'https://management.azure.com' @@ -48,3 +50,4 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id + self.subscription_id1 = subscription_id1 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 a54d59f8452d..c042b77800bf 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 @@ -88,13 +88,15 @@ class CosmosDBManagementClient(SDKClient): object` :param subscription_id: Azure subscription ID. :type subscription_id: str + :param subscription_id1: The ID of the target subscription. + :type subscription_id1: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, subscription_id1, base_url=None): - self.config = CosmosDBManagementClientConfiguration(credentials, subscription_id, base_url) + self.config = CosmosDBManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url) super(CosmosDBManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} 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 5200f9fe8ef6..ee4c14cafa92 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 @@ -12,7 +12,6 @@ try: from ._models_py3 import ARMProxyResource from ._models_py3 import ARMResourceProperties - from ._models_py3 import AutopilotSettingsResource from ._models_py3 import AutoUpgradePolicyResource from ._models_py3 import AzureEntityResource from ._models_py3 import Capability @@ -84,6 +83,7 @@ from ._models_py3 import PrivateEndpointProperty from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkServiceConnectionStateProperty + from ._models_py3 import ProvisionedThroughputSettingsResource from ._models_py3 import ProxyResource from ._models_py3 import RegionForOnlineOffline from ._models_py3 import Resource @@ -125,7 +125,6 @@ except (SyntaxError, ImportError): from ._models import ARMProxyResource from ._models import ARMResourceProperties - from ._models import AutopilotSettingsResource from ._models import AutoUpgradePolicyResource from ._models import AzureEntityResource from ._models import Capability @@ -197,6 +196,7 @@ from ._models import PrivateEndpointProperty from ._models import PrivateLinkResource from ._models import PrivateLinkServiceConnectionStateProperty + from ._models import ProvisionedThroughputSettingsResource from ._models import ProxyResource from ._models import RegionForOnlineOffline from ._models import Resource @@ -279,7 +279,6 @@ __all__ = [ 'ARMProxyResource', 'ARMResourceProperties', - 'AutopilotSettingsResource', 'AutoUpgradePolicyResource', 'AzureEntityResource', 'Capability', @@ -351,6 +350,7 @@ 'PrivateEndpointProperty', 'PrivateLinkResource', 'PrivateLinkServiceConnectionStateProperty', + 'ProvisionedThroughputSettingsResource', 'ProxyResource', 'RegionForOnlineOffline', 'Resource', 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 48901a798c8c..561c4b002bb9 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 @@ -89,43 +89,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class AutopilotSettingsResource(Model): - """Cosmos DB autopilot settings 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 max_throughput: Required. Represents max throughput an autopilot - container can operate at. - :type max_throughput: int - :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy - :type auto_upgrade_policy: - ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource - :ivar target_max_throughput: Represents target max throughput an autopilot - container should operate at once offer is no longer in pending state. - :vartype target_max_throughput: int - """ - - _validation = { - 'max_throughput': {'required': True}, - 'target_max_throughput': {'readonly': True}, - } - - _attribute_map = { - 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, - 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, - 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AutopilotSettingsResource, self).__init__(**kwargs) - self.max_throughput = kwargs.get('max_throughput', None) - self.auto_upgrade_policy = kwargs.get('auto_upgrade_policy', None) - self.target_max_throughput = None - - class AutoUpgradePolicyResource(Model): """Cosmos DB resource auto-upgrade policy. @@ -3015,6 +2978,43 @@ def __init__(self, **kwargs): self.actions_required = None +class ProvisionedThroughputSettingsResource(Model): + """Cosmos DB provisioned throughput settings 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 max_throughput: Required. Represents maximum throughput container + can scale up to. + :type max_throughput: int + :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy + :type auto_upgrade_policy: + ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource + :ivar target_max_throughput: Represents target maximum throughput + container can scale up to once offer is no longer in pending state. + :vartype target_max_throughput: int + """ + + _validation = { + 'max_throughput': {'required': True}, + 'target_max_throughput': {'readonly': True}, + } + + _attribute_map = { + 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, + 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, + 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ProvisionedThroughputSettingsResource, self).__init__(**kwargs) + self.max_throughput = kwargs.get('max_throughput', None) + self.auto_upgrade_policy = kwargs.get('auto_upgrade_policy', None) + self.target_max_throughput = None + + class RegionForOnlineOffline(Model): """Cosmos DB region to online or offline. @@ -4134,13 +4134,14 @@ class ThroughputSettingsGetPropertiesResource(Model): sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4165,7 +4166,7 @@ class ThroughputSettingsGetPropertiesResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, '_rid': {'key': '_rid', 'type': 'str'}, @@ -4176,7 +4177,7 @@ class ThroughputSettingsGetPropertiesResource(Model): def __init__(self, **kwargs): super(ThroughputSettingsGetPropertiesResource, self).__init__(**kwargs) self.throughput = kwargs.get('throughput', None) - self.autopilot_settings = kwargs.get('autopilot_settings', None) + self.provisioned_throughput_settings = kwargs.get('provisioned_throughput_settings', None) self.minimum_throughput = None self.offer_replace_pending = None self._rid = None @@ -4228,19 +4229,20 @@ def __init__(self, **kwargs): class ThroughputSettingsResource(Model): """Cosmos DB resource throughput object. Either throughput is required or - autopilotSettings is required, but not both. + provisionedThroughputSettings is required, but not both. Variables are only populated by the server, and will be ignored when sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4254,7 +4256,7 @@ class ThroughputSettingsResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, } @@ -4262,7 +4264,7 @@ class ThroughputSettingsResource(Model): def __init__(self, **kwargs): super(ThroughputSettingsResource, self).__init__(**kwargs) self.throughput = kwargs.get('throughput', None) - self.autopilot_settings = kwargs.get('autopilot_settings', None) + self.provisioned_throughput_settings = kwargs.get('provisioned_throughput_settings', None) self.minimum_throughput = None self.offer_replace_pending = None 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 962ba48fb534..e1a4850e91ca 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 @@ -89,43 +89,6 @@ def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: self.tags = tags -class AutopilotSettingsResource(Model): - """Cosmos DB autopilot settings 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 max_throughput: Required. Represents max throughput an autopilot - container can operate at. - :type max_throughput: int - :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy - :type auto_upgrade_policy: - ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource - :ivar target_max_throughput: Represents target max throughput an autopilot - container should operate at once offer is no longer in pending state. - :vartype target_max_throughput: int - """ - - _validation = { - 'max_throughput': {'required': True}, - 'target_max_throughput': {'readonly': True}, - } - - _attribute_map = { - 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, - 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, - 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, - } - - def __init__(self, *, max_throughput: int, auto_upgrade_policy=None, **kwargs) -> None: - super(AutopilotSettingsResource, self).__init__(**kwargs) - self.max_throughput = max_throughput - self.auto_upgrade_policy = auto_upgrade_policy - self.target_max_throughput = None - - class AutoUpgradePolicyResource(Model): """Cosmos DB resource auto-upgrade policy. @@ -3015,6 +2978,43 @@ def __init__(self, *, status: str=None, description: str=None, **kwargs) -> None self.actions_required = None +class ProvisionedThroughputSettingsResource(Model): + """Cosmos DB provisioned throughput settings 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 max_throughput: Required. Represents maximum throughput container + can scale up to. + :type max_throughput: int + :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy + :type auto_upgrade_policy: + ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource + :ivar target_max_throughput: Represents target maximum throughput + container can scale up to once offer is no longer in pending state. + :vartype target_max_throughput: int + """ + + _validation = { + 'max_throughput': {'required': True}, + 'target_max_throughput': {'readonly': True}, + } + + _attribute_map = { + 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, + 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, + 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, + } + + def __init__(self, *, max_throughput: int, auto_upgrade_policy=None, **kwargs) -> None: + super(ProvisionedThroughputSettingsResource, self).__init__(**kwargs) + self.max_throughput = max_throughput + self.auto_upgrade_policy = auto_upgrade_policy + self.target_max_throughput = None + + class RegionForOnlineOffline(Model): """Cosmos DB region to online or offline. @@ -4134,13 +4134,14 @@ class ThroughputSettingsGetPropertiesResource(Model): sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4165,7 +4166,7 @@ class ThroughputSettingsGetPropertiesResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, '_rid': {'key': '_rid', 'type': 'str'}, @@ -4173,10 +4174,10 @@ class ThroughputSettingsGetPropertiesResource(Model): '_etag': {'key': '_etag', 'type': 'str'}, } - def __init__(self, *, throughput: int=None, autopilot_settings=None, **kwargs) -> None: + def __init__(self, *, throughput: int=None, provisioned_throughput_settings=None, **kwargs) -> None: super(ThroughputSettingsGetPropertiesResource, self).__init__(**kwargs) self.throughput = throughput - self.autopilot_settings = autopilot_settings + self.provisioned_throughput_settings = provisioned_throughput_settings self.minimum_throughput = None self.offer_replace_pending = None self._rid = None @@ -4228,19 +4229,20 @@ def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> class ThroughputSettingsResource(Model): """Cosmos DB resource throughput object. Either throughput is required or - autopilotSettings is required, but not both. + provisionedThroughputSettings is required, but not both. Variables are only populated by the server, and will be ignored when sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4254,15 +4256,15 @@ class ThroughputSettingsResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, } - def __init__(self, *, throughput: int=None, autopilot_settings=None, **kwargs) -> None: + def __init__(self, *, throughput: int=None, provisioned_throughput_settings=None, **kwargs) -> None: super(ThroughputSettingsResource, self).__init__(**kwargs) self.throughput = throughput - self.autopilot_settings = autopilot_settings + self.provisioned_throughput_settings = provisioned_throughput_settings self.minimum_throughput = None self.offer_replace_pending = None