diff --git a/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py index f0340e7dabff..ae7a2bee187e 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py +++ b/azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py @@ -124,6 +124,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-09-30: :mod:`v2018_09_30.models` * 2018-10-01: :mod:`v2018_10_01.models` * 2019-03-01: :mod:`v2019_03_01.models` + * 2019-04-01: :mod:`v2019_04_01.models` """ if api_version == '2015-06-15': from .v2015_06_15 import models @@ -158,6 +159,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2019-03-01': from .v2019_03_01 import models return models + elif api_version == '2019-04-01': + from .v2019_04_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -379,12 +383,15 @@ def resource_skus(self): * 2017-03-30: :class:`ResourceSkusOperations` * 2017-09-01: :class:`ResourceSkusOperations` + * 2019-04-01: :class:`ResourceSkusOperations` """ api_version = self._get_api_version('resource_skus') if api_version == '2017-03-30': from .v2017_03_30.operations import ResourceSkusOperations as OperationClass elif api_version == '2017-09-01': from .v2017_09_01.operations import ResourceSkusOperations as OperationClass + elif api_version == '2019-04-01': + from .v2019_04_01.operations import ResourceSkusOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py new file mode 100644 index 000000000000..88ded2f640de --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/__init__.py @@ -0,0 +1,18 @@ +# 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. +# -------------------------------------------------------------------------- + +from .compute_management_client import ComputeManagementClient +from .version import VERSION + +__all__ = ['ComputeManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/compute_management_client.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/compute_management_client.py new file mode 100644 index 000000000000..3de156b35292 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/compute_management_client.py @@ -0,0 +1,85 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.resource_skus_operations import ResourceSkusOperations +from . import models + + +class ComputeManagementClientConfiguration(AzureConfiguration): + """Configuration for ComputeManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, 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 not base_url: + base_url = 'https://management.azure.com' + + super(ComputeManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class ComputeManagementClient(SDKClient): + """Compute Client + + :ivar config: Configuration for client. + :vartype config: ComputeManagementClientConfiguration + + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.compute.v2019_04_01.operations.ResourceSkusOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Subscription credentials which uniquely identify + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) + super(ComputeManagementClient, 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 = '2019-04-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.resource_skus = ResourceSkusOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py new file mode 100644 index 000000000000..f38c3f941ded --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/__init__.py @@ -0,0 +1,50 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from .resource_sku_capacity_py3 import ResourceSkuCapacity + from .resource_sku_costs_py3 import ResourceSkuCosts + from .resource_sku_capabilities_py3 import ResourceSkuCapabilities + from .resource_sku_zone_details_py3 import ResourceSkuZoneDetails + from .resource_sku_restriction_info_py3 import ResourceSkuRestrictionInfo + from .resource_sku_restrictions_py3 import ResourceSkuRestrictions + from .resource_sku_location_info_py3 import ResourceSkuLocationInfo + from .resource_sku_py3 import ResourceSku +except (SyntaxError, ImportError): + from .resource_sku_capacity import ResourceSkuCapacity + from .resource_sku_costs import ResourceSkuCosts + from .resource_sku_capabilities import ResourceSkuCapabilities + from .resource_sku_zone_details import ResourceSkuZoneDetails + from .resource_sku_restriction_info import ResourceSkuRestrictionInfo + from .resource_sku_restrictions import ResourceSkuRestrictions + from .resource_sku_location_info import ResourceSkuLocationInfo + from .resource_sku import ResourceSku +from .resource_sku_paged import ResourceSkuPaged +from .compute_management_client_enums import ( + ResourceSkuCapacityScaleType, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionsReasonCode, +) + +__all__ = [ + 'ResourceSkuCapacity', + 'ResourceSkuCosts', + 'ResourceSkuCapabilities', + 'ResourceSkuZoneDetails', + 'ResourceSkuRestrictionInfo', + 'ResourceSkuRestrictions', + 'ResourceSkuLocationInfo', + 'ResourceSku', + 'ResourceSkuPaged', + 'ResourceSkuCapacityScaleType', + 'ResourceSkuRestrictionsType', + 'ResourceSkuRestrictionsReasonCode', +] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/compute_management_client_enums.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/compute_management_client_enums.py new file mode 100644 index 000000000000..7b1680238d1c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/compute_management_client_enums.py @@ -0,0 +1,31 @@ +# 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. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class ResourceSkuCapacityScaleType(str, Enum): + + automatic = "Automatic" + manual = "Manual" + none = "None" + + +class ResourceSkuRestrictionsType(str, Enum): + + location = "Location" + zone = "Zone" + + +class ResourceSkuRestrictionsReasonCode(str, Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku.py new file mode 100644 index 000000000000..f8559f2a1b3f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku.py @@ -0,0 +1,103 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.location_info = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities.py new file mode 100644 index 000000000000..658167afc6d4 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities.py @@ -0,0 +1,40 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities_py3.py new file mode 100644 index 000000000000..73a2631fc0aa --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capabilities_py3.py @@ -0,0 +1,40 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilities object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: An invariant to describe the feature. + :vartype name: str + :ivar value: An invariant if the feature is measured by quantity. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapabilities, self).__init__(**kwargs) + self.name = None + self.value = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity.py new file mode 100644 index 000000000000..8a7db313f578 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity.py @@ -0,0 +1,52 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity_py3.py new file mode 100644 index 000000000000..94d28f12b4e7 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_capacity_py3.py @@ -0,0 +1,52 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuCapacity(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar minimum: The minimum capacity. + :vartype minimum: long + :ivar maximum: The maximum capacity that can be set. + :vartype maximum: long + :ivar default: The default capacity. + :vartype default: long + :ivar scale_type: The scale type applicable to the sku. Possible values + include: 'Automatic', 'Manual', 'None' + :vartype scale_type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacityScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'long'}, + 'maximum': {'key': 'maximum', 'type': 'long'}, + 'default': {'key': 'default', 'type': 'long'}, + 'scale_type': {'key': 'scaleType', 'type': 'ResourceSkuCapacityScaleType'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs.py new file mode 100644 index 000000000000..293adaf0962c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs.py @@ -0,0 +1,45 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs_py3.py new file mode 100644 index 000000000000..59e7036807d6 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_costs_py3.py @@ -0,0 +1,45 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuCosts(Model): + """Describes metadata for retrieving price info. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar meter_id: Used for querying price from commerce. + :vartype meter_id: str + :ivar quantity: The multiplier is needed to extend the base metered cost. + :vartype quantity: long + :ivar extended_unit: An invariant to show the extended unit. + :vartype extended_unit: str + """ + + _validation = { + 'meter_id': {'readonly': True}, + 'quantity': {'readonly': True}, + 'extended_unit': {'readonly': True}, + } + + _attribute_map = { + 'meter_id': {'key': 'meterID', 'type': 'str'}, + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'extended_unit': {'key': 'extendedUnit', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuCosts, self).__init__(**kwargs) + self.meter_id = None + self.quantity = None + self.extended_unit = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info.py new file mode 100644 index 000000000000..7ec4620aabcb --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info.py @@ -0,0 +1,47 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info_py3.py new file mode 100644 index 000000000000..f2f048971f65 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_location_info_py3.py @@ -0,0 +1,47 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuLocationInfo(Model): + """ResourceSkuLocationInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location: Location of the SKU + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific + zones. + :vartype zone_details: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_paged.py new file mode 100644 index 000000000000..e7e74718f35b --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_paged.py @@ -0,0 +1,27 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ResourceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_py3.py new file mode 100644 index 000000000000..db0e4ccf5a1c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_py3.py @@ -0,0 +1,103 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSku(Model): + """Describes an available Compute SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_type: The type of resource the SKU applies to. + :vartype resource_type: str + :ivar name: The name of SKU. + :vartype name: str + :ivar tier: Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + :vartype tier: str + :ivar size: The Size of the SKU. + :vartype size: str + :ivar family: The Family of this particular SKU. + :vartype family: str + :ivar kind: The Kind of resources that are supported in this SKU. + :vartype kind: str + :ivar capacity: Specifies the number of virtual machines in the scale set. + :vartype capacity: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapacity + :ivar locations: The set of locations that the SKU is available. + :vartype locations: list[str] + :ivar location_info: A list of locations and availability zones in those + locations where the SKU is available. + :vartype location_info: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuLocationInfo] + :ivar api_versions: The api versions that support this SKU. + :vartype api_versions: list[str] + :ivar costs: Metadata for retrieving price info. + :vartype costs: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCosts] + :ivar capabilities: A name value pair to describe the capability. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + :ivar restrictions: The restrictions because of which SKU cannot be used. + This is empty if there are no restrictions. + :vartype restrictions: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictions] + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'size': {'readonly': True}, + 'family': {'readonly': True}, + 'kind': {'readonly': True}, + 'capacity': {'readonly': True}, + 'locations': {'readonly': True}, + 'location_info': {'readonly': True}, + 'api_versions': {'readonly': True}, + 'costs': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ResourceSkuCapacity'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'location_info': {'key': 'locationInfo', 'type': '[ResourceSkuLocationInfo]'}, + 'api_versions': {'key': 'apiVersions', 'type': '[str]'}, + 'costs': {'key': 'costs', 'type': '[ResourceSkuCosts]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.resource_type = None + self.name = None + self.tier = None + self.size = None + self.family = None + self.kind = None + self.capacity = None + self.locations = None + self.location_info = None + self.api_versions = None + self.costs = None + self.capabilities = None + self.restrictions = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info.py new file mode 100644 index 000000000000..677e93463d58 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info.py @@ -0,0 +1,40 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info_py3.py new file mode 100644 index 000000000000..008cf8d4c5fa --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restriction_info_py3.py @@ -0,0 +1,40 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictionInfo(Model): + """ResourceSkuRestrictionInfo. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar locations: Locations where the SKU is restricted + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions.py new file mode 100644 index 000000000000..8f11353d277d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions.py @@ -0,0 +1,57 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions_py3.py new file mode 100644 index 000000000000..22d50fe2b48c --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_restrictions_py3.py @@ -0,0 +1,57 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuRestrictions(Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The type of restrictions. Possible values include: 'Location', + 'Zone' + :vartype type: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to + location. This would be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the + SKU cannot be used. + :vartype restriction_info: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: + 'QuotaId', 'NotAvailableForSubscription' + :vartype reason_code: str or + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'ResourceSkuRestrictionsType'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'ResourceSkuRestrictionsReasonCode'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details.py new file mode 100644 index 000000000000..5543790851ee --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details.py @@ -0,0 +1,43 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__(self, **kwargs): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details_py3.py new file mode 100644 index 000000000000..4a8ee65fa7be --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/models/resource_sku_zone_details_py3.py @@ -0,0 +1,43 @@ +# 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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResourceSkuZoneDetails(Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The set of zones that the SKU is available in with the + specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU + in the specified list of zones. + :vartype capabilities: + list[~azure.mgmt.compute.v2019_04_01.models.ResourceSkuCapabilities] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapabilities]'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py new file mode 100644 index 000000000000..2df0e5028143 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/__init__.py @@ -0,0 +1,16 @@ +# 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. +# -------------------------------------------------------------------------- + +from .resource_skus_operations import ResourceSkusOperations + +__all__ = [ + 'ResourceSkusOperations', +] diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/resource_skus_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/resource_skus_operations.py new file mode 100644 index 000000000000..53311a56765d --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/operations/resource_skus_operations.py @@ -0,0 +1,103 @@ +# 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 ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + :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: Client Api Version. Constant value: "2019-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-04-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the list of Microsoft.Compute SKUs available for your + 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 ResourceSku + :rtype: + ~azure.mgmt.compute.v2019_04_01.models.ResourceSkuPaged[~azure.mgmt.compute.v2019_04_01.models.ResourceSku] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + 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') + } + 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') + + 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) + 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 + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/version.py b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/version.py new file mode 100644 index 000000000000..fe4b0545122f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2019-04-01" +