diff --git a/azure-mgmt-trafficmanager/HISTORY.rst b/azure-mgmt-trafficmanager/HISTORY.rst index 080ba80372a2..35693628de5e 100644 --- a/azure-mgmt-trafficmanager/HISTORY.rst +++ b/azure-mgmt-trafficmanager/HISTORY.rst @@ -3,6 +3,48 @@ Release History =============== +0.50.0 (2018-05-25) ++++++++++++++++++++ + +**Features** + +- Model Endpoint has a new parameter custom_headers +- Model MonitorConfig has a new parameter custom_headers +- Model MonitorConfig has a new parameter expected_status_code_ranges +- Model Profile has a new parameter traffic_view_enrollment_status +- Added operation group HeatMapOperations +- Client class can be used as a context manager to keep the underlying HTTP session open for performance + +**General Breaking changes** + +This version uses a next-generation code generator that *might* introduce breaking changes. + +- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments. + To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments. +- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered. + While this is not a breaking change, the distinctions are important, and are documented here: + https://docs.python.org/3/library/enum.html#others + At a glance: + + - "is" should not be used at all. + - "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered. + +- New Long Running Operation: + + - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. + - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. + - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, + the response of the initial call will be returned without polling. + - `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`. + - `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away. + +**Bugfixes** + +- Compatibility of the sdist with wheel 0.31.0 + + 0.40.0 (2017-07-03) +++++++++++++++++++ diff --git a/azure-mgmt-trafficmanager/README.rst b/azure-mgmt-trafficmanager/README.rst index dbacee1b4596..947b56fed25d 100644 --- a/azure-mgmt-trafficmanager/README.rst +++ b/azure-mgmt-trafficmanager/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Traffic Manager Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `Traffic Manager -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index c41ba9dd7f2c..16e7f531c796 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -9,18 +9,46 @@ # regenerated. # -------------------------------------------------------------------------- -from .delete_operation_result import DeleteOperationResult -from .endpoint import Endpoint -from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters -from .dns_config import DnsConfig -from .monitor_config import MonitorConfig -from .profile import Profile -from .traffic_manager_name_availability import TrafficManagerNameAvailability -from .region import Region -from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy -from .resource import Resource -from .tracked_resource import TrackedResource -from .proxy_resource import ProxyResource +try: + from .delete_operation_result_py3 import DeleteOperationResult + from .endpoint_properties_custom_headers_item_py3 import EndpointPropertiesCustomHeadersItem + from .heat_map_endpoint_py3 import HeatMapEndpoint + from .query_experience_py3 import QueryExperience + from .traffic_flow_py3 import TrafficFlow + from .heat_map_model_py3 import HeatMapModel + from .endpoint_py3 import Endpoint + from .check_traffic_manager_relative_dns_name_availability_parameters_py3 import CheckTrafficManagerRelativeDnsNameAvailabilityParameters + from .dns_config_py3 import DnsConfig + from .monitor_config_custom_headers_item_py3 import MonitorConfigCustomHeadersItem + from .monitor_config_expected_status_code_ranges_item_py3 import MonitorConfigExpectedStatusCodeRangesItem + from .monitor_config_py3 import MonitorConfig + from .profile_py3 import Profile + from .traffic_manager_name_availability_py3 import TrafficManagerNameAvailability + from .region_py3 import Region + from .traffic_manager_geographic_hierarchy_py3 import TrafficManagerGeographicHierarchy + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .proxy_resource_py3 import ProxyResource +except (SyntaxError, ImportError): + from .delete_operation_result import DeleteOperationResult + from .endpoint_properties_custom_headers_item import EndpointPropertiesCustomHeadersItem + from .heat_map_endpoint import HeatMapEndpoint + from .query_experience import QueryExperience + from .traffic_flow import TrafficFlow + from .heat_map_model import HeatMapModel + from .endpoint import Endpoint + from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters + from .dns_config import DnsConfig + from .monitor_config_custom_headers_item import MonitorConfigCustomHeadersItem + from .monitor_config_expected_status_code_ranges_item import MonitorConfigExpectedStatusCodeRangesItem + from .monitor_config import MonitorConfig + from .profile import Profile + from .traffic_manager_name_availability import TrafficManagerNameAvailability + from .region import Region + from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy + from .resource import Resource + from .tracked_resource import TrackedResource + from .proxy_resource import ProxyResource from .profile_paged import ProfilePaged from .traffic_manager_management_client_enums import ( EndpointStatus, @@ -29,13 +57,21 @@ MonitorProtocol, ProfileStatus, TrafficRoutingMethod, + TrafficViewEnrollmentStatus, ) __all__ = [ 'DeleteOperationResult', + 'EndpointPropertiesCustomHeadersItem', + 'HeatMapEndpoint', + 'QueryExperience', + 'TrafficFlow', + 'HeatMapModel', 'Endpoint', 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters', 'DnsConfig', + 'MonitorConfigCustomHeadersItem', + 'MonitorConfigExpectedStatusCodeRangesItem', 'MonitorConfig', 'Profile', 'TrafficManagerNameAvailability', @@ -51,4 +87,5 @@ 'MonitorProtocol', 'ProfileStatus', 'TrafficRoutingMethod', + 'TrafficViewEnrollmentStatus', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py index 5f0f8a69e760..1e26b45eb788 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters.py @@ -26,6 +26,7 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type=None): - self.name = name - self.type = type + def __init__(self, **kwargs): + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py new file mode 100644 index 000000000000..d8ef2dda2b26 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py @@ -0,0 +1,32 @@ +# 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 CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): + """Parameters supplied to check Traffic Manager name operation. + + :param name: The name of the resource. + :type name: str + :param type: The type of the resource. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py index b3f73ced1df7..2da7e41543e4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result.py @@ -30,5 +30,6 @@ class DeleteOperationResult(Model): 'operation_result': {'key': 'boolean', 'type': 'bool'}, } - def __init__(self): + def __init__(self, **kwargs): + super(DeleteOperationResult, self).__init__(**kwargs) self.operation_result = None diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py new file mode 100644 index 000000000000..5cc1960c6f7e --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py @@ -0,0 +1,35 @@ +# 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 DeleteOperationResult(Model): + """The result of the request or operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar operation_result: The result of the operation or request. + :vartype operation_result: bool + """ + + _validation = { + 'operation_result': {'readonly': True}, + } + + _attribute_map = { + 'operation_result': {'key': 'boolean', 'type': 'bool'}, + } + + def __init__(self, **kwargs) -> None: + super(DeleteOperationResult, self).__init__(**kwargs) + self.operation_result = None diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py index 9091f3f250ed..501be4bfb276 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py @@ -43,7 +43,8 @@ class DnsConfig(Model): 'ttl': {'key': 'ttl', 'type': 'long'}, } - def __init__(self, relative_name=None, ttl=None): - self.relative_name = relative_name + def __init__(self, **kwargs): + super(DnsConfig, self).__init__(**kwargs) + self.relative_name = kwargs.get('relative_name', None) self.fqdn = None - self.ttl = ttl + self.ttl = kwargs.get('ttl', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py new file mode 100644 index 000000000000..74a79966f868 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.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. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DnsConfig(Model): + """Class containing DNS settings in a Traffic Manager profile. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param relative_name: The relative DNS name provided by this Traffic + Manager profile. This value is combined with the DNS domain name used by + Azure Traffic Manager to form the fully-qualified domain name (FQDN) of + the profile. + :type relative_name: str + :ivar fqdn: The fully-qualified domain name (FQDN) of the Traffic Manager + profile. This is formed from the concatenation of the RelativeName with + the DNS domain used by Azure Traffic Manager. + :vartype fqdn: str + :param ttl: The DNS Time-To-Live (TTL), in seconds. This informs the local + DNS resolvers and DNS clients how long to cache DNS responses provided by + this Traffic Manager profile. + :type ttl: long + """ + + _validation = { + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'relative_name': {'key': 'relativeName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ttl': {'key': 'ttl', 'type': 'long'}, + } + + def __init__(self, *, relative_name: str=None, ttl: int=None, **kwargs) -> None: + super(DnsConfig, self).__init__(**kwargs) + self.relative_name = relative_name + self.fqdn = None + self.ttl = ttl diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py index d521b844fa53..0054ed7b772b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -15,29 +15,26 @@ class Endpoint(ProxyResource): """Class representing a Traffic Manager endpoint. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param target_resource_id: The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. :type target_resource_id: str - :param target: The fully-qualified DNS name of the endpoint. Traffic - Manager returns this value in DNS responses to direct traffic to this - endpoint. + :param target: The fully-qualified DNS name or IP address of the endpoint. + Traffic Manager returns this value in DNS responses to direct traffic to + this endpoint. :type target: str :param endpoint_status: The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. Possible values include: 'Enabled', 'Disabled' - :type endpoint_status: str or :class:`EndpointStatus - ` + :type endpoint_status: str or + ~azure.mgmt.trafficmanager.models.EndpointStatus :param weight: The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. :type weight: long @@ -53,8 +50,8 @@ class Endpoint(ProxyResource): :param endpoint_monitor_status: The monitoring status of the endpoint. Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', 'Disabled', 'Inactive', 'Stopped' - :type endpoint_monitor_status: str or :class:`EndpointMonitorStatus - ` + :type endpoint_monitor_status: str or + ~azure.mgmt.trafficmanager.models.EndpointMonitorStatus :param min_child_endpoints: The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type @@ -63,15 +60,12 @@ class Endpoint(ProxyResource): :param geo_mapping: The list of countries/regions mapped to this endpoint when using the ‘Geographic’ traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. - :type geo_mapping: list of str + :type geo_mapping: list[str] + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesCustomHeadersItem] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -85,16 +79,18 @@ class Endpoint(ProxyResource): 'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'}, 'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'}, 'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, } - def __init__(self, target_resource_id=None, target=None, endpoint_status=None, weight=None, priority=None, endpoint_location=None, endpoint_monitor_status=None, min_child_endpoints=None, geo_mapping=None): - super(Endpoint, self).__init__() - self.target_resource_id = target_resource_id - self.target = target - self.endpoint_status = endpoint_status - self.weight = weight - self.priority = priority - self.endpoint_location = endpoint_location - self.endpoint_monitor_status = endpoint_monitor_status - self.min_child_endpoints = min_child_endpoints - self.geo_mapping = geo_mapping + def __init__(self, **kwargs): + super(Endpoint, self).__init__(**kwargs) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.target = kwargs.get('target', None) + self.endpoint_status = kwargs.get('endpoint_status', None) + self.weight = kwargs.get('weight', None) + self.priority = kwargs.get('priority', None) + self.endpoint_location = kwargs.get('endpoint_location', None) + self.endpoint_monitor_status = kwargs.get('endpoint_monitor_status', None) + self.min_child_endpoints = kwargs.get('min_child_endpoints', None) + self.geo_mapping = kwargs.get('geo_mapping', None) + self.custom_headers = kwargs.get('custom_headers', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py new file mode 100644 index 000000000000..ac5b3c43ed1a --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py @@ -0,0 +1,32 @@ +# 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 EndpointPropertiesCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(EndpointPropertiesCustomHeadersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py new file mode 100644 index 000000000000..d0c95f5ca25b --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py @@ -0,0 +1,32 @@ +# 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 EndpointPropertiesCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(EndpointPropertiesCustomHeadersItem, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py new file mode 100644 index 000000000000..367993bbf1c5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py @@ -0,0 +1,96 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class Endpoint(ProxyResource): + """Class representing a Traffic Manager endpoint. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param target_resource_id: The Azure Resource URI of the of the endpoint. + Not applicable to endpoints of type 'ExternalEndpoints'. + :type target_resource_id: str + :param target: The fully-qualified DNS name or IP address of the endpoint. + Traffic Manager returns this value in DNS responses to direct traffic to + this endpoint. + :type target: str + :param endpoint_status: The status of the endpoint. If the endpoint is + Enabled, it is probed for endpoint health and is included in the traffic + routing method. Possible values include: 'Enabled', 'Disabled' + :type endpoint_status: str or + ~azure.mgmt.trafficmanager.models.EndpointStatus + :param weight: The weight of this endpoint when using the 'Weighted' + traffic routing method. Possible values are from 1 to 1000. + :type weight: long + :param priority: The priority of this endpoint when using the ‘Priority’ + traffic routing method. Possible values are from 1 to 1000, lower values + represent higher priority. This is an optional parameter. If specified, + it must be specified on all endpoints, and no two endpoints can share the + same priority value. + :type priority: long + :param endpoint_location: Specifies the location of the external or nested + endpoints when using the ‘Performance’ traffic routing method. + :type endpoint_location: str + :param endpoint_monitor_status: The monitoring status of the endpoint. + Possible values include: 'CheckingEndpoint', 'Online', 'Degraded', + 'Disabled', 'Inactive', 'Stopped' + :type endpoint_monitor_status: str or + ~azure.mgmt.trafficmanager.models.EndpointMonitorStatus + :param min_child_endpoints: The minimum number of endpoints that must be + available in the child profile in order for the parent profile to be + considered available. Only applicable to endpoint of type + 'NestedEndpoints'. + :type min_child_endpoints: long + :param geo_mapping: The list of countries/regions mapped to this endpoint + when using the ‘Geographic’ traffic routing method. Please consult Traffic + Manager Geographic documentation for a full list of accepted values. + :type geo_mapping: list[str] + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesCustomHeadersItem] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'endpoint_status': {'key': 'properties.endpointStatus', 'type': 'str'}, + 'weight': {'key': 'properties.weight', 'type': 'long'}, + 'priority': {'key': 'properties.priority', 'type': 'long'}, + 'endpoint_location': {'key': 'properties.endpointLocation', 'type': 'str'}, + 'endpoint_monitor_status': {'key': 'properties.endpointMonitorStatus', 'type': 'str'}, + 'min_child_endpoints': {'key': 'properties.minChildEndpoints', 'type': 'long'}, + 'geo_mapping': {'key': 'properties.geoMapping', 'type': '[str]'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, target_resource_id: str=None, target: str=None, endpoint_status=None, weight: int=None, priority: int=None, endpoint_location: str=None, endpoint_monitor_status=None, min_child_endpoints: int=None, geo_mapping=None, custom_headers=None, **kwargs) -> None: + super(Endpoint, self).__init__(id=id, name=name, type=type, **kwargs) + self.target_resource_id = target_resource_id + self.target = target + self.endpoint_status = endpoint_status + self.weight = weight + self.priority = priority + self.endpoint_location = endpoint_location + self.endpoint_monitor_status = endpoint_monitor_status + self.min_child_endpoints = min_child_endpoints + self.geo_mapping = geo_mapping + self.custom_headers = custom_headers diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py new file mode 100644 index 000000000000..add3cf93b309 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py @@ -0,0 +1,33 @@ +# 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 HeatMapEndpoint(Model): + """Class which is a sparse representation of a Traffic Manager endpoint. + + :param resource_id: The ARM Resource ID of this Traffic Manager endpoint. + :type resource_id: str + :param endpoint_id: A number uniquely identifying this endpoint in query + experiences. + :type endpoint_id: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HeatMapEndpoint, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.endpoint_id = kwargs.get('endpoint_id', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py new file mode 100644 index 000000000000..eff0c0887005 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py @@ -0,0 +1,33 @@ +# 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 HeatMapEndpoint(Model): + """Class which is a sparse representation of a Traffic Manager endpoint. + + :param resource_id: The ARM Resource ID of this Traffic Manager endpoint. + :type resource_id: str + :param endpoint_id: A number uniquely identifying this endpoint in query + experiences. + :type endpoint_id: int + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + } + + def __init__(self, *, resource_id: str=None, endpoint_id: int=None, **kwargs) -> None: + super(HeatMapEndpoint, self).__init__(**kwargs) + self.resource_id = resource_id + self.endpoint_id = endpoint_id diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py new file mode 100644 index 000000000000..255716b0acd9 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py @@ -0,0 +1,54 @@ +# 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 .proxy_resource import ProxyResource + + +class HeatMapModel(ProxyResource): + """Class representing a Traffic Manager HeatMap. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param start_time: The beginning of the time window for this HeatMap, + inclusive. + :type start_time: datetime + :param end_time: The ending of the time window for this HeatMap, + exclusive. + :type end_time: datetime + :param endpoints: The endpoints used in this HeatMap calculation. + :type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint] + :param traffic_flows: The traffic flows produced in this HeatMap + calculation. + :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'}, + 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, + } + + def __init__(self, **kwargs): + super(HeatMapModel, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.endpoints = kwargs.get('endpoints', None) + self.traffic_flows = kwargs.get('traffic_flows', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py new file mode 100644 index 000000000000..c5a47ad4f537 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py @@ -0,0 +1,54 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class HeatMapModel(ProxyResource): + """Class representing a Traffic Manager HeatMap. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param start_time: The beginning of the time window for this HeatMap, + inclusive. + :type start_time: datetime + :param end_time: The ending of the time window for this HeatMap, + exclusive. + :type end_time: datetime + :param endpoints: The endpoints used in this HeatMap calculation. + :type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint] + :param traffic_flows: The traffic flows produced in this HeatMap + calculation. + :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'}, + 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, start_time=None, end_time=None, endpoints=None, traffic_flows=None, **kwargs) -> None: + super(HeatMapModel, self).__init__(id=id, name=name, type=type, **kwargs) + self.start_time = start_time + self.end_time = end_time + self.endpoints = endpoints + self.traffic_flows = traffic_flows diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py index 590518ae775c..829c3bc20ec4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py @@ -18,12 +18,11 @@ class MonitorConfig(Model): :param profile_monitor_status: The profile-level monitoring status of the Traffic Manager profile. Possible values include: 'CheckingEndpoints', 'Online', 'Degraded', 'Disabled', 'Inactive' - :type profile_monitor_status: str or :class:`ProfileMonitorStatus - ` + :type profile_monitor_status: str or + ~azure.mgmt.trafficmanager.models.ProfileMonitorStatus :param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP' - :type protocol: str or :class:`MonitorProtocol - ` + :type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol :param port: The TCP port used to probe for endpoint health. :type port: long :param path: The path relative to the endpoint domain name used to probe @@ -41,6 +40,12 @@ class MonitorConfig(Model): health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check. :type tolerated_number_of_failures: long + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.MonitorConfigCustomHeadersItem] + :param expected_status_code_ranges: List of expected status code ranges. + :type expected_status_code_ranges: + list[~azure.mgmt.trafficmanager.models.MonitorConfigExpectedStatusCodeRangesItem] """ _attribute_map = { @@ -51,13 +56,18 @@ class MonitorConfig(Model): 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'long'}, 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'long'}, 'tolerated_number_of_failures': {'key': 'toleratedNumberOfFailures', 'type': 'long'}, + 'custom_headers': {'key': 'customHeaders', 'type': '[MonitorConfigCustomHeadersItem]'}, + 'expected_status_code_ranges': {'key': 'expectedStatusCodeRanges', 'type': '[MonitorConfigExpectedStatusCodeRangesItem]'}, } - def __init__(self, profile_monitor_status=None, protocol=None, port=None, path=None, interval_in_seconds=None, timeout_in_seconds=None, tolerated_number_of_failures=None): - self.profile_monitor_status = profile_monitor_status - self.protocol = protocol - self.port = port - self.path = path - self.interval_in_seconds = interval_in_seconds - self.timeout_in_seconds = timeout_in_seconds - self.tolerated_number_of_failures = tolerated_number_of_failures + def __init__(self, **kwargs): + super(MonitorConfig, self).__init__(**kwargs) + self.profile_monitor_status = kwargs.get('profile_monitor_status', None) + self.protocol = kwargs.get('protocol', None) + self.port = kwargs.get('port', None) + self.path = kwargs.get('path', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + self.timeout_in_seconds = kwargs.get('timeout_in_seconds', None) + self.tolerated_number_of_failures = kwargs.get('tolerated_number_of_failures', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.expected_status_code_ranges = kwargs.get('expected_status_code_ranges', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py new file mode 100644 index 000000000000..e98f2ae02d49 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MonitorConfigCustomHeadersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py new file mode 100644 index 000000000000..7d616409cf51 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigCustomHeadersItem(Model): + """Custom header name and value. + + :param name: Header name. + :type name: str + :param value: Header value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: + super(MonitorConfigCustomHeadersItem, self).__init__(**kwargs) + self.name = name + self.value = value diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py new file mode 100644 index 000000000000..a5276d230394 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigExpectedStatusCodeRangesItem(Model): + """Min and max value of a status code range. + + :param min: Min status code. + :type min: int + :param max: Max status code. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py new file mode 100644 index 000000000000..f999298028a8 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py @@ -0,0 +1,32 @@ +# 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 MonitorConfigExpectedStatusCodeRangesItem(Model): + """Min and max value of a status code range. + + :param min: Min status code. + :type min: int + :param max: Max status code. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__(self, *, min: int=None, max: int=None, **kwargs) -> None: + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__(**kwargs) + self.min = min + self.max = max diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py new file mode 100644 index 000000000000..ed9d0b39ff48 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py @@ -0,0 +1,73 @@ +# 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 MonitorConfig(Model): + """Class containing endpoint monitoring settings in a Traffic Manager profile. + + :param profile_monitor_status: The profile-level monitoring status of the + Traffic Manager profile. Possible values include: 'CheckingEndpoints', + 'Online', 'Degraded', 'Disabled', 'Inactive' + :type profile_monitor_status: str or + ~azure.mgmt.trafficmanager.models.ProfileMonitorStatus + :param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for + endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP' + :type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol + :param port: The TCP port used to probe for endpoint health. + :type port: long + :param path: The path relative to the endpoint domain name used to probe + for endpoint health. + :type path: str + :param interval_in_seconds: The monitor interval for endpoints in this + profile. This is the interval at which Traffic Manager will check the + health of each endpoint in this profile. + :type interval_in_seconds: long + :param timeout_in_seconds: The monitor timeout for endpoints in this + profile. This is the time that Traffic Manager allows endpoints in this + profile to response to the health check. + :type timeout_in_seconds: long + :param tolerated_number_of_failures: The number of consecutive failed + health check that Traffic Manager tolerates before declaring an endpoint + in this profile Degraded after the next failed health check. + :type tolerated_number_of_failures: long + :param custom_headers: List of custom headers. + :type custom_headers: + list[~azure.mgmt.trafficmanager.models.MonitorConfigCustomHeadersItem] + :param expected_status_code_ranges: List of expected status code ranges. + :type expected_status_code_ranges: + list[~azure.mgmt.trafficmanager.models.MonitorConfigExpectedStatusCodeRangesItem] + """ + + _attribute_map = { + 'profile_monitor_status': {'key': 'profileMonitorStatus', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'long'}, + 'path': {'key': 'path', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'long'}, + 'timeout_in_seconds': {'key': 'timeoutInSeconds', 'type': 'long'}, + 'tolerated_number_of_failures': {'key': 'toleratedNumberOfFailures', 'type': 'long'}, + 'custom_headers': {'key': 'customHeaders', 'type': '[MonitorConfigCustomHeadersItem]'}, + 'expected_status_code_ranges': {'key': 'expectedStatusCodeRanges', 'type': '[MonitorConfigExpectedStatusCodeRangesItem]'}, + } + + def __init__(self, *, profile_monitor_status=None, protocol=None, port: int=None, path: str=None, interval_in_seconds: int=None, timeout_in_seconds: int=None, tolerated_number_of_failures: int=None, custom_headers=None, expected_status_code_ranges=None, **kwargs) -> None: + super(MonitorConfig, self).__init__(**kwargs) + self.profile_monitor_status = profile_monitor_status + self.protocol = protocol + self.port = port + self.path = path + self.interval_in_seconds = interval_in_seconds + self.timeout_in_seconds = timeout_in_seconds + self.tolerated_number_of_failures = tolerated_number_of_failures + self.custom_headers = custom_headers + self.expected_status_code_ranges = expected_status_code_ranges diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index 61e38bbe7b4e..5c5831e70ccd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -15,48 +15,42 @@ class Profile(TrackedResource): """Class representing a Traffic Manager profile. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param location: The Azure Region where the resource lives :type location: str :param profile_status: The status of the Traffic Manager profile. Possible values include: 'Enabled', 'Disabled' - :type profile_status: str or :class:`ProfileStatus - ` + :type profile_status: str or + ~azure.mgmt.trafficmanager.models.ProfileStatus :param traffic_routing_method: The traffic routing method of the Traffic Manager profile. Possible values include: 'Performance', 'Priority', 'Weighted', 'Geographic' - :type traffic_routing_method: str or :class:`TrafficRoutingMethod - ` + :type traffic_routing_method: str or + ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod :param dns_config: The DNS settings of the Traffic Manager profile. - :type dns_config: :class:`DnsConfig - ` + :type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig :param monitor_config: The endpoint monitoring settings of the Traffic Manager profile. - :type monitor_config: :class:`MonitorConfig - ` + :type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig :param endpoints: The list of endpoints in the Traffic Manager profile. - :type endpoints: list of :class:`Endpoint - ` + :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] + :param traffic_view_enrollment_status: Indicates whether Traffic View is + 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates + 'Disabled'. Enabling this feature will increase the cost of the Traffic + Manage profile. Possible values include: 'Enabled', 'Disabled' + :type traffic_view_enrollment_status: str or + ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -68,12 +62,14 @@ class Profile(TrackedResource): 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfig'}, 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, } - def __init__(self, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None): - super(Profile, self).__init__(tags=tags, location=location) - self.profile_status = profile_status - self.traffic_routing_method = traffic_routing_method - self.dns_config = dns_config - self.monitor_config = monitor_config - self.endpoints = endpoints + def __init__(self, **kwargs): + super(Profile, self).__init__(**kwargs) + self.profile_status = kwargs.get('profile_status', None) + self.traffic_routing_method = kwargs.get('traffic_routing_method', None) + self.dns_config = kwargs.get('dns_config', None) + self.monitor_config = kwargs.get('monitor_config', None) + self.endpoints = kwargs.get('endpoints', None) + self.traffic_view_enrollment_status = kwargs.get('traffic_view_enrollment_status', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py index 3d62cd910cd0..04652ccd9400 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_paged.py @@ -14,7 +14,7 @@ class ProfilePaged(Paged): """ - A paging container for iterating over a list of Profile object + A paging container for iterating over a list of :class:`Profile ` object """ _attribute_map = { diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py new file mode 100644 index 000000000000..f412c1e65900 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py @@ -0,0 +1,75 @@ +# 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 .tracked_resource_py3 import TrackedResource + + +class Profile(TrackedResource): + """Class representing a Traffic Manager profile. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + :param profile_status: The status of the Traffic Manager profile. Possible + values include: 'Enabled', 'Disabled' + :type profile_status: str or + ~azure.mgmt.trafficmanager.models.ProfileStatus + :param traffic_routing_method: The traffic routing method of the Traffic + Manager profile. Possible values include: 'Performance', 'Priority', + 'Weighted', 'Geographic' + :type traffic_routing_method: str or + ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod + :param dns_config: The DNS settings of the Traffic Manager profile. + :type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig + :param monitor_config: The endpoint monitoring settings of the Traffic + Manager profile. + :type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig + :param endpoints: The list of endpoints in the Traffic Manager profile. + :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] + :param traffic_view_enrollment_status: Indicates whether Traffic View is + 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates + 'Disabled'. Enabling this feature will increase the cost of the Traffic + Manage profile. Possible values include: 'Enabled', 'Disabled' + :type traffic_view_enrollment_status: str or + ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'profile_status': {'key': 'properties.profileStatus', 'type': 'str'}, + 'traffic_routing_method': {'key': 'properties.trafficRoutingMethod', 'type': 'str'}, + 'dns_config': {'key': 'properties.dnsConfig', 'type': 'DnsConfig'}, + 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, tags=None, location: str=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None, traffic_view_enrollment_status=None, **kwargs) -> None: + super(Profile, self).__init__(id=id, name=name, type=type, tags=tags, location=location, **kwargs) + self.profile_status = profile_status + self.traffic_routing_method = traffic_routing_method + self.dns_config = dns_config + self.monitor_config = monitor_config + self.endpoints = endpoints + self.traffic_view_enrollment_status = traffic_view_enrollment_status diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py index 27d4c8b91fb5..6c28b1486d47 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py @@ -16,24 +16,21 @@ class ProxyResource(Resource): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - super(ProxyResource, self).__init__() + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py new file mode 100644 index 000000000000..2ddbec4c9593 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py @@ -0,0 +1,36 @@ +# 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_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(ProxyResource, self).__init__(id=id, name=name, type=type, **kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py new file mode 100644 index 000000000000..18f8555520a1 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py @@ -0,0 +1,46 @@ +# 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 QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_id: Required. The id of the endpoint from the 'endpoints' + array which these queries were routed to. + :type endpoint_id: int + :param query_count: Required. The number of queries originating from this + location. + :type query_count: int + :param latency: The latency experienced by queries originating from this + location. + :type latency: float + """ + + _validation = { + 'endpoint_id': {'required': True}, + 'query_count': {'required': True}, + } + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + 'query_count': {'key': 'queryCount', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(QueryExperience, self).__init__(**kwargs) + self.endpoint_id = kwargs.get('endpoint_id', None) + self.query_count = kwargs.get('query_count', None) + self.latency = kwargs.get('latency', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py new file mode 100644 index 000000000000..84b7835b59a0 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py @@ -0,0 +1,46 @@ +# 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 QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_id: Required. The id of the endpoint from the 'endpoints' + array which these queries were routed to. + :type endpoint_id: int + :param query_count: Required. The number of queries originating from this + location. + :type query_count: int + :param latency: The latency experienced by queries originating from this + location. + :type latency: float + """ + + _validation = { + 'endpoint_id': {'required': True}, + 'query_count': {'required': True}, + } + + _attribute_map = { + 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, + 'query_count': {'key': 'queryCount', 'type': 'int'}, + 'latency': {'key': 'latency', 'type': 'float'}, + } + + def __init__(self, *, endpoint_id: int, query_count: int, latency: float=None, **kwargs) -> None: + super(QueryExperience, self).__init__(**kwargs) + self.endpoint_id = endpoint_id + self.query_count = query_count + self.latency = latency diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py index 3502d19c19e4..1e358a541bfd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py @@ -22,8 +22,7 @@ class Region(Model): :type name: str :param regions: The list of Regions grouped under this Region in the Geographic Hierarchy. - :type regions: list of :class:`Region - ` + :type regions: list[~azure.mgmt.trafficmanager.models.Region] """ _attribute_map = { @@ -32,7 +31,8 @@ class Region(Model): 'regions': {'key': 'regions', 'type': '[Region]'}, } - def __init__(self, code=None, name=None, regions=None): - self.code = code - self.name = name - self.regions = regions + def __init__(self, **kwargs): + super(Region, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.name = kwargs.get('name', None) + self.regions = kwargs.get('regions', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py new file mode 100644 index 000000000000..5899c229f365 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py @@ -0,0 +1,38 @@ +# 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 Region(Model): + """Class representing a region in the Geographic hierarchy used with the + Geographic traffic routing method. + + :param code: The code of the region + :type code: str + :param name: The name of the region + :type name: str + :param regions: The list of Regions grouped under this Region in the + Geographic Hierarchy. + :type regions: list[~azure.mgmt.trafficmanager.models.Region] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'regions': {'key': 'regions', 'type': '[Region]'}, + } + + def __init__(self, *, code: str=None, name: str=None, regions=None, **kwargs) -> None: + super(Region, self).__init__(**kwargs) + self.code = code + self.name = name + self.regions = regions diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py index 502263321c4f..e69909f81f81 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -15,32 +15,24 @@ class Resource(Model): """The core properties of ARM resources. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self): - self.id = None - self.name = None - self.type = None + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py new file mode 100644 index 000000000000..b3b3eb79ac2c --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py @@ -0,0 +1,38 @@ +# 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 Resource(Model): + """The core properties of ARM resources. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py index 9969862c3a39..0400b888df53 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py @@ -15,29 +15,20 @@ class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param location: The Azure Region where the resource lives :type location: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -46,7 +37,7 @@ class TrackedResource(Resource): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, tags=None, location=None): - super(TrackedResource, self).__init__() - self.tags = tags - self.location = location + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py new file mode 100644 index 000000000000..90ace2635832 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_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 .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: The Azure Region where the resource lives + :type location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(id=id, name=name, type=type, **kwargs) + self.tags = tags + self.location = location diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py new file mode 100644 index 000000000000..0c32b8cac1d3 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.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 TrafficFlow(Model): + """Class representing a Traffic Manager HeatMap traffic flow properties. + + :param source_ip: The IP address that this query experience originated + from. + :type source_ip: str + :param latitude: The approximate latitude that these queries originated + from. + :type latitude: float + :param longitude: The approximate longitude that these queries originated + from. + :type longitude: float + :param query_experiences: The query experiences produced in this HeatMap + calculation. + :type query_experiences: + list[~azure.mgmt.trafficmanager.models.QueryExperience] + """ + + _attribute_map = { + 'source_ip': {'key': 'sourceIp', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'float'}, + 'longitude': {'key': 'longitude', 'type': 'float'}, + 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, + } + + def __init__(self, **kwargs): + super(TrafficFlow, self).__init__(**kwargs) + self.source_ip = kwargs.get('source_ip', None) + self.latitude = kwargs.get('latitude', None) + self.longitude = kwargs.get('longitude', None) + self.query_experiences = kwargs.get('query_experiences', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py new file mode 100644 index 000000000000..28c396b417f5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_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 TrafficFlow(Model): + """Class representing a Traffic Manager HeatMap traffic flow properties. + + :param source_ip: The IP address that this query experience originated + from. + :type source_ip: str + :param latitude: The approximate latitude that these queries originated + from. + :type latitude: float + :param longitude: The approximate longitude that these queries originated + from. + :type longitude: float + :param query_experiences: The query experiences produced in this HeatMap + calculation. + :type query_experiences: + list[~azure.mgmt.trafficmanager.models.QueryExperience] + """ + + _attribute_map = { + 'source_ip': {'key': 'sourceIp', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'float'}, + 'longitude': {'key': 'longitude', 'type': 'float'}, + 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, + } + + def __init__(self, *, source_ip: str=None, latitude: float=None, longitude: float=None, query_experiences=None, **kwargs) -> None: + super(TrafficFlow, self).__init__(**kwargs) + self.source_ip = source_ip + self.latitude = latitude + self.longitude = longitude + self.query_experiences = query_experiences diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py index b10c5fe5b23d..11d886c49f10 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy.py @@ -16,29 +16,19 @@ class TrafficManagerGeographicHierarchy(ProxyResource): """Class representing the Geographic hierarchy used with the Geographic traffic routing method. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. Ex - + :param id: Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} - :vartype id: str - :ivar name: The name of the resource - :vartype name: str - :ivar type: The type of the resource. Ex- + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :vartype type: str + :type type: str :param geographic_hierarchy: The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved. - :type geographic_hierarchy: :class:`Region - ` + :type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -46,6 +36,6 @@ class TrafficManagerGeographicHierarchy(ProxyResource): 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, } - def __init__(self, geographic_hierarchy=None): - super(TrafficManagerGeographicHierarchy, self).__init__() - self.geographic_hierarchy = geographic_hierarchy + def __init__(self, **kwargs): + super(TrafficManagerGeographicHierarchy, self).__init__(**kwargs) + self.geographic_hierarchy = kwargs.get('geographic_hierarchy', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py new file mode 100644 index 000000000000..142fffe5f15b --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py @@ -0,0 +1,41 @@ +# 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 .proxy_resource_py3 import ProxyResource + + +class TrafficManagerGeographicHierarchy(ProxyResource): + """Class representing the Geographic hierarchy used with the Geographic + traffic routing method. + + :param id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} + :type id: str + :param name: The name of the resource + :type name: str + :param type: The type of the resource. Ex- + Microsoft.Network/trafficmanagerProfiles. + :type type: str + :param geographic_hierarchy: The region at the root of the hierarchy from + all the regions in the hierarchy can be retrieved. + :type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, geographic_hierarchy=None, **kwargs) -> None: + super(TrafficManagerGeographicHierarchy, self).__init__(id=id, name=name, type=type, **kwargs) + self.geographic_hierarchy = geographic_hierarchy diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py index 2cfc1756cb51..5efc19f68740 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_management_client_enums.py @@ -12,13 +12,13 @@ from enum import Enum -class EndpointStatus(Enum): +class EndpointStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class EndpointMonitorStatus(Enum): +class EndpointMonitorStatus(str, Enum): checking_endpoint = "CheckingEndpoint" online = "Online" @@ -28,7 +28,7 @@ class EndpointMonitorStatus(Enum): stopped = "Stopped" -class ProfileMonitorStatus(Enum): +class ProfileMonitorStatus(str, Enum): checking_endpoints = "CheckingEndpoints" online = "Online" @@ -37,22 +37,28 @@ class ProfileMonitorStatus(Enum): inactive = "Inactive" -class MonitorProtocol(Enum): +class MonitorProtocol(str, Enum): http = "HTTP" https = "HTTPS" tcp = "TCP" -class ProfileStatus(Enum): +class ProfileStatus(str, Enum): enabled = "Enabled" disabled = "Disabled" -class TrafficRoutingMethod(Enum): +class TrafficRoutingMethod(str, Enum): performance = "Performance" priority = "Priority" weighted = "Weighted" geographic = "Geographic" + + +class TrafficViewEnrollmentStatus(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py index a38a59b5f873..f51a8785201b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability.py @@ -37,9 +37,10 @@ class TrafficManagerNameAvailability(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, name=None, type=None, name_available=None, reason=None, message=None): - self.name = name - self.type = type - self.name_available = name_available - self.reason = reason - self.message = message + def __init__(self, **kwargs): + super(TrafficManagerNameAvailability, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py new file mode 100644 index 000000000000..c28513705c95 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py @@ -0,0 +1,46 @@ +# 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 TrafficManagerNameAvailability(Model): + """Class representing a Traffic Manager Name Availability response. + + :param name: The relative name. + :type name: str + :param type: Traffic Manager profile resource type. + :type type: str + :param name_available: Describes whether the relative name is available or + not. + :type name_available: bool + :param reason: The reason why the name is not available, when applicable. + :type reason: str + :param message: Descriptive message that explains why the name is not + available, when applicable. + :type message: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(TrafficManagerNameAvailability, self).__init__(**kwargs) + self.name = name + self.type = type + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py index 415f816221f4..d337ba0ff8a0 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py @@ -12,9 +12,11 @@ from .endpoints_operations import EndpointsOperations from .profiles_operations import ProfilesOperations from .geographic_hierarchies_operations import GeographicHierarchiesOperations +from .heat_map_operations import HeatMapOperations __all__ = [ 'EndpointsOperations', 'ProfilesOperations', 'GeographicHierarchiesOperations', + 'HeatMapOperations', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py index b115a7edf4b5..f4edba686289 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class EndpointsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -52,20 +54,19 @@ def update( :type endpoint_name: str :param parameters: The Traffic Manager endpoint parameters supplied to the Update operation. - :type parameters: :class:`Endpoint - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Endpoint :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`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -95,7 +96,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -112,6 +113,7 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def get( self, resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -131,13 +133,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -163,7 +165,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -180,6 +182,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def create_or_update( self, resource_group_name, profile_name, endpoint_type, endpoint_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -198,20 +201,19 @@ def create_or_update( :type endpoint_name: str :param parameters: The Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. - :type parameters: :class:`Endpoint - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Endpoint :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`. - :rtype: :class:`Endpoint ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Endpoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Endpoint or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -241,7 +243,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -260,6 +262,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} def delete( self, resource_group_name, profile_name, endpoint_type, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -281,14 +284,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeleteOperationResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -314,7 +316,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -331,3 +333,4 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/{endpointType}/{endpointName}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py index a08339703e51..48ec79c5cc6f 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/geographic_hierarchies_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class GeographicHierarchiesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -45,14 +47,15 @@ def get_default( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`TrafficManagerGeographicHierarchy - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: TrafficManagerGeographicHierarchy or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerGeographicHierarchy or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default' + url = self.get_default.metadata['url'] # Construct parameters query_parameters = {} @@ -70,7 +73,7 @@ def get_default( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -87,3 +90,4 @@ def get_default( return client_raw_response return deserialized + get_default.metadata = {'url': '/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py new file mode 100644 index 000000000000..0e2006fa2c8d --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py @@ -0,0 +1,114 @@ +# 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 HeatMapOperations(object): + """HeatMapOperations 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 heat_map_type: The type of HeatMap for the Traffic Manager profile. Constant value: "default". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.heat_map_type = "default" + self.api_version = "2018-03-01" + + self.config = config + + def get( + self, resource_group_name, profile_name, top_left=None, bot_right=None, custom_headers=None, raw=False, **operation_config): + """Gets latest heatmap for Traffic Manager profile. + + :param resource_group_name: The name of the resource group containing + the Traffic Manager endpoint. + :type resource_group_name: str + :param profile_name: The name of the Traffic Manager profile. + :type profile_name: str + :param top_left: The top left latitude,longitude pair of the + rectangular viewport to query for. + :type top_left: list[float] + :param bot_right: The bottom right latitude,longitude pair of the + rectangular viewport to query for. + :type bot_right: list[float] + :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: HeatMapModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.HeatMapModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'heatMapType': self._serialize.url("self.heat_map_type", self.heat_map_type, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if top_left is not None: + query_parameters['topLeft'] = self._serialize.query("top_left", top_left, '[float]', div=',', max_items=2, min_items=2) + if bot_right is not None: + query_parameters['botRight'] = self._serialize.query("bot_right", bot_right, '[float]', div=',', max_items=2, min_items=2) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('HeatMapModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py index eceeab07fe19..d7b1ab52f633 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -22,16 +22,18 @@ class ProfilesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-05-01" + self.api_version = "2018-03-01" self.config = config @@ -48,16 +50,17 @@ def check_traffic_manager_relative_dns_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`TrafficManagerNameAvailability - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: TrafficManagerNameAvailability or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerNameAvailability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ parameters = models.CheckTrafficManagerRelativeDnsNameAvailabilityParameters(name=name, type=type) # Construct URL - url = '/providers/Microsoft.Network/checkTrafficManagerNameAvailability' + url = self.check_traffic_manager_relative_dns_name_availability.metadata['url'] # Construct parameters query_parameters = {} @@ -79,7 +82,7 @@ def check_traffic_manager_relative_dns_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -96,6 +99,7 @@ def check_traffic_manager_relative_dns_name_availability( return client_raw_response return deserialized + check_traffic_manager_relative_dns_name_availability.metadata = {'url': '/providers/Microsoft.Network/checkTrafficManagerNameAvailability'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -109,15 +113,16 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ProfilePaged - ` + :return: An iterator like instance of Profile + :rtype: + ~azure.mgmt.trafficmanager.models.ProfilePaged[~azure.mgmt.trafficmanager.models.Profile] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -145,7 +150,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -163,6 +168,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles'} def list_by_subscription( self, custom_headers=None, raw=False, **operation_config): @@ -173,15 +179,16 @@ def list_by_subscription( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ProfilePaged - ` + :return: An iterator like instance of Profile + :rtype: + ~azure.mgmt.trafficmanager.models.ProfilePaged[~azure.mgmt.trafficmanager.models.Profile] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles' + url = self.list_by_subscription.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -208,7 +215,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -226,6 +233,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles'} def get( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -241,13 +249,13 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -271,7 +279,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -288,6 +296,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def create_or_update( self, resource_group_name, profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -300,20 +309,19 @@ def create_or_update( :type profile_name: str :param parameters: The Traffic Manager profile parameters supplied to the CreateOrUpdate operation. - :type parameters: :class:`Profile - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Profile :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`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -341,7 +349,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -360,6 +368,7 @@ def create_or_update( return client_raw_response return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def delete( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -376,14 +385,13 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeleteOperationResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -407,7 +415,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -424,6 +432,7 @@ def delete( return client_raw_response return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} def update( self, resource_group_name, profile_name, parameters, custom_headers=None, raw=False, **operation_config): @@ -436,20 +445,19 @@ def update( :type profile_name: str :param parameters: The Traffic Manager profile parameters supplied to the Update operation. - :type parameters: :class:`Profile - ` + :type parameters: ~azure.mgmt.trafficmanager.models.Profile :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`. - :rtype: :class:`Profile ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Profile or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.Profile or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -477,7 +485,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -494,3 +502,4 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}'} diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py index 4fc420ca3bdf..5982206b29ae 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py @@ -9,13 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.endpoints_operations import EndpointsOperations from .operations.profiles_operations import ProfilesOperations from .operations.geographic_hierarchies_operations import GeographicHierarchiesOperations +from .operations.heat_map_operations import HeatMapOperations from . import models @@ -41,21 +42,19 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' super(TrafficManagerManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('trafficmanagermanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-trafficmanager/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials self.subscription_id = subscription_id -class TrafficManagerManagementClient(object): +class TrafficManagerManagementClient(SDKClient): """TrafficManagerManagementClient :ivar config: Configuration for client. @@ -67,6 +66,8 @@ class TrafficManagerManagementClient(object): :vartype profiles: azure.mgmt.trafficmanager.operations.ProfilesOperations :ivar geographic_hierarchies: GeographicHierarchies operations :vartype geographic_hierarchies: azure.mgmt.trafficmanager.operations.GeographicHierarchiesOperations + :ivar heat_map: HeatMap operations + :vartype heat_map: azure.mgmt.trafficmanager.operations.HeatMapOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -82,10 +83,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = TrafficManagerManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(TrafficManagerManagementClient, 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 = '2017-05-01' + self.api_version = '2018-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -95,3 +96,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.geographic_hierarchies = GeographicHierarchiesOperations( self._client, self.config, self._serialize, self._deserialize) + self.heat_map = HeatMapOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py index 57866fdf17d0..1002e003856c 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.40.0" +VERSION = "0.50.0" diff --git a/azure-mgmt-trafficmanager/build.json b/azure-mgmt-trafficmanager/build.json deleted file mode 100644 index f1f715d8363e..000000000000 --- a/azure-mgmt-trafficmanager/build.json +++ /dev/null @@ -1 +0,0 @@ -{"autorest": "1.1.0", "date": "2017-06-30T18:58:00Z", "version": ""} \ No newline at end of file diff --git a/azure-mgmt-trafficmanager/sdk_packaging.toml b/azure-mgmt-trafficmanager/sdk_packaging.toml new file mode 100644 index 000000000000..95a3d39ca5db --- /dev/null +++ b/azure-mgmt-trafficmanager/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-trafficmanager" +package_pprint_name = "Traffic Manager" +package_doc_id = "traffic-manager" +is_stable = false diff --git a/azure-mgmt-trafficmanager/setup.py b/azure-mgmt-trafficmanager/setup.py index 9eed435aa049..c126f5565201 100644 --- a/azure-mgmt-trafficmanager/setup.py +++ b/azure-mgmt-trafficmanager/setup.py @@ -61,7 +61,7 @@ long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', - author_email='ptvshelp@microsoft.com', + author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ 'Development Status :: 4 - Beta', @@ -69,17 +69,16 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(), + packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.8', - 'azure-common~=1.1.6', + 'msrestazure>=0.4.27,<2.0.0', + 'azure-common~=1.1', ], cmdclass=cmdclass )