From 0372280463c4bf44e5a6bfa71889b3662cbc4c00 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 21 Feb 2018 16:51:26 -0800 Subject: [PATCH 1/6] [TrafficManager] Update (#1597) * Generated from 342d0f9c112e798f81e6ba344d9d598badba49d4 * Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/1597 --- .../mgmt/trafficmanager/models/__init__.py | 10 + ...lative_dns_name_availability_parameters.py | 1 + .../models/delete_operation_result.py | 1 + .../mgmt/trafficmanager/models/dns_config.py | 1 + .../mgmt/trafficmanager/models/endpoint.py | 10 +- .../models/heat_map_endpoint.py | 33 +++ .../trafficmanager/models/heat_map_model.py | 63 +++++ .../trafficmanager/models/monitor_config.py | 8 +- .../mgmt/trafficmanager/models/profile.py | 19 +- .../trafficmanager/models/profile_paged.py | 2 +- .../trafficmanager/models/query_experience.py | 43 ++++ .../mgmt/trafficmanager/models/region.py | 4 +- .../mgmt/trafficmanager/models/resource.py | 1 + .../trafficmanager/models/tracked_resource.py | 2 +- .../trafficmanager/models/traffic_flow.py | 45 ++++ .../traffic_manager_geographic_hierarchy.py | 3 +- .../traffic_manager_name_availability.py | 1 + .../traffic_manager_user_metrics_key_model.py | 48 ++++ .../trafficmanager/operations/__init__.py | 4 + .../operations/endpoints_operations.py | 57 ++--- .../geographic_hierarchies_operations.py | 20 +- .../operations/heat_map_operations.py | 114 +++++++++ .../operations/profiles_operations.py | 91 +++---- ...ic_manager_user_metrics_keys_operations.py | 211 ++++++++++++++++ .../traffic_manager_management_client.py | 15 +- .../azure/mgmt/trafficmanager/version.py | 2 +- azure-mgmt-trafficmanager/build.json | 226 +++++++++++++++++- 27 files changed, 927 insertions(+), 108 deletions(-) create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index c41ba9dd7f2c..48762db4a915 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -21,6 +21,11 @@ from .resource import Resource from .tracked_resource import TrackedResource from .proxy_resource import ProxyResource +from .heat_map_endpoint import HeatMapEndpoint +from .query_experience import QueryExperience +from .traffic_flow import TrafficFlow +from .heat_map_model import HeatMapModel +from .traffic_manager_user_metrics_key_model import TrafficManagerUserMetricsKeyModel from .profile_paged import ProfilePaged from .traffic_manager_management_client_enums import ( EndpointStatus, @@ -44,6 +49,11 @@ 'Resource', 'TrackedResource', 'ProxyResource', + 'HeatMapEndpoint', + 'QueryExperience', + 'TrafficFlow', + 'HeatMapModel', + 'TrafficManagerUserMetricsKeyModel', 'ProfilePaged', 'EndpointStatus', 'EndpointMonitorStatus', 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..2e199f1405a7 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 @@ -27,5 +27,6 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): } def __init__(self, name=None, type=None): + super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__() 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..b2808ae43edd 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 @@ -31,4 +31,5 @@ class DeleteOperationResult(Model): } def __init__(self): + super(DeleteOperationResult, self).__init__() 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..136d75ef7467 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config.py @@ -44,6 +44,7 @@ class DnsConfig(Model): } def __init__(self, relative_name=None, ttl=None): + super(DnsConfig, self).__init__() 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..2564e5b1271a 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -36,8 +36,8 @@ class Endpoint(ProxyResource): :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 +53,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,7 +63,7 @@ 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] """ _validation = { 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..1cb860b3e689 --- /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, resource_id=None, endpoint_id=None): + super(HeatMapEndpoint, self).__init__() + 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..68d9d427d563 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py @@ -0,0 +1,63 @@ +# 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. + + 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 - + /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- + Microsoft.Network/trafficmanagerProfiles. + :vartype 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] + """ + + _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'}, + '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, start_time=None, end_time=None, endpoints=None, traffic_flows=None): + super(HeatMapModel, self).__init__() + 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..594b7a50b28f 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 @@ -54,6 +53,7 @@ class MonitorConfig(Model): } 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): + super(MonitorConfig, self).__init__() self.profile_monitor_status = profile_monitor_status self.protocol = protocol self.port = port diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index 61e38bbe7b4e..e92224bed00c 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -27,28 +27,25 @@ class Profile(TrackedResource): Microsoft.Network/trafficmanagerProfiles. :vartype 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] """ _validation = { 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/query_experience.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py new file mode 100644 index 000000000000..914486c5cd96 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QueryExperience(Model): + """Class representing a Traffic Manager HeatMap query experience properties. + + :param endpoint_id: The id of the endpoint from the 'endpoints' array + which these queries were routed to. + :type endpoint_id: int + :param query_count: 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, query_count, latency=None): + super(QueryExperience, self).__init__() + 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..60627f16fc66 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 = { @@ -33,6 +32,7 @@ class Region(Model): } def __init__(self, code=None, name=None, regions=None): + super(Region, self).__init__() 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..65a2d08306a7 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -41,6 +41,7 @@ class Resource(Model): } def __init__(self): + super(Resource, self).__init__() self.id = None self.name = None self.type = None 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..2c42e3e2596b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py @@ -27,7 +27,7 @@ class TrackedResource(Resource): Microsoft.Network/trafficmanagerProfiles. :vartype 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 """ 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..85651d2feed2 --- /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, source_ip=None, latitude=None, longitude=None, query_experiences=None): + super(TrafficFlow, self).__init__() + 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..81b91aa64873 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 @@ -29,8 +29,7 @@ class TrafficManagerGeographicHierarchy(ProxyResource): :vartype 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 = { 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..da80f7134ce0 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 @@ -38,6 +38,7 @@ class TrafficManagerNameAvailability(Model): } def __init__(self, name=None, type=None, name_available=None, reason=None, message=None): + super(TrafficManagerNameAvailability, self).__init__() self.name = name self.type = type self.name_available = name_available diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py new file mode 100644 index 000000000000..fa811f8e6df5 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py @@ -0,0 +1,48 @@ +# 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 TrafficManagerUserMetricsKeyModel(ProxyResource): + """Class representing a Traffic Manager Real User Metrics key response. + + 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 - + /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- + Microsoft.Network/trafficmanagerProfiles. + :vartype type: str + :param key: The key returned by the Real User Metrics operation. + :type key: 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'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, key=None): + super(TrafficManagerUserMetricsKeyModel, self).__init__() + self.key = key diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py index 415f816221f4..d81d2cc5a9ec 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py @@ -12,9 +12,13 @@ from .endpoints_operations import EndpointsOperations from .profiles_operations import ProfilesOperations from .geographic_hierarchies_operations import GeographicHierarchiesOperations +from .heat_map_operations import HeatMapOperations +from .traffic_manager_user_metrics_keys_operations import TrafficManagerUserMetricsKeysOperations __all__ = [ 'EndpointsOperations', 'ProfilesOperations', 'GeographicHierarchiesOperations', + 'HeatMapOperations', + 'TrafficManagerUserMetricsKeysOperations', ] 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..9b284b6ef8e9 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,10 +22,12 @@ 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. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -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..841098e48668 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,10 +22,12 @@ 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. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -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..00c70e9e1935 --- /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: "2017-09-01-preview". + """ + + 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 = "2017-09-01-preview" + + 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..acff93e4b118 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,10 +22,12 @@ 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. + :param deserializer: An object model deserializer. :ivar api_version: Client Api Version. Constant value: "2017-05-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -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/operations/traffic_manager_user_metrics_keys_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py new file mode 100644 index 000000000000..6ba71e3c074f --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py @@ -0,0 +1,211 @@ +# 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 TrafficManagerUserMetricsKeysOperations(object): + """TrafficManagerUserMetricsKeysOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2017-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-09-01-preview" + + self.config = config + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Get the subscription-level key used for Real User Metrics collection. + + :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: TrafficManagerUserMetricsKeyModel or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerUserMetricsKeyModel 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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('TrafficManagerUserMetricsKeyModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys'} + + def create_or_update( + self, custom_headers=None, raw=False, **operation_config): + """Create or update a subscription-level key used for Real User Metrics + collection. + + :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: TrafficManagerUserMetricsKeyModel or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.trafficmanager.models.TrafficManagerUserMetricsKeyModel or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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.put(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('TrafficManagerUserMetricsKeyModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys'} + + def delete( + self, custom_headers=None, raw=False, **operation_config): + """Delete a subscription-level key used for Real User Metrics collection. + + :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: DeleteOperationResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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.delete(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('DeleteOperationResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys'} 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..7f0bc16c7ad1 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 @@ -16,6 +16,8 @@ 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 .operations.traffic_manager_user_metrics_keys_operations import TrafficManagerUserMetricsKeysOperations from . import models @@ -41,14 +43,12 @@ 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 @@ -67,6 +67,10 @@ 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 + :ivar traffic_manager_user_metrics_keys: TrafficManagerUserMetricsKeys operations + :vartype traffic_manager_user_metrics_keys: azure.mgmt.trafficmanager.operations.TrafficManagerUserMetricsKeysOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -85,7 +89,6 @@ def __init__( self._client = ServiceClient(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._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -95,3 +98,7 @@ 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) + self.traffic_manager_user_metrics_keys = TrafficManagerUserMetricsKeysOperations( + 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..53a203f32aaf 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 = "" diff --git a/azure-mgmt-trafficmanager/build.json b/azure-mgmt-trafficmanager/build.json index f1f715d8363e..d5356f60b700 100644 --- a/azure-mgmt-trafficmanager/build.json +++ b/azure-mgmt-trafficmanager/build.json @@ -1 +1,225 @@ -{"autorest": "1.1.0", "date": "2017-06-30T18:58:00Z", "version": ""} \ No newline at end of file +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4168", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/async-io": "~1.0.22", + "@microsoft.azure/extension": "~1.2.12", + "@types/commonmark": "^0.27.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.28", + "@types/pify": "0.0.28", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "commonmark": "^0.27.0", + "file-url": "^2.0.2", + "get-uri": "^2.0.0", + "jsonpath": "^0.2.11", + "linq-es2015": "^2.4.25", + "mocha": "3.4.2", + "mocha-typescript": "1.1.5", + "pify": "^3.0.0", + "safe-eval": "^0.3.0", + "shx": "^0.2.2", + "source-map": "^0.5.6", + "source-map-support": "^0.4.15", + "strip-bom": "^3.0.0", + "typescript": "2.5.3", + "untildify": "^3.0.2", + "urijs": "^1.18.10", + "vscode-jsonrpc": "^3.3.1", + "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", + "yargs": "^8.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest-core@2.0.4168", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.1.22", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.1.22", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.0.19", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^1.9.0", + "autorest": "^2.0.0", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.0.19", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file From 4c3be05e105eabec1686bce42d940b4cc3bc5949 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 2 May 2018 15:26:58 -0700 Subject: [PATCH 2/6] Generated from 522734738313c7d5b08453d1edc8427d89ce2810 (#2479) Introduce Azure Traffic Manager 2018-03-01 API version with custom headers and status code ranges options. --- .../mgmt/trafficmanager/models/__init__.py | 24 +- .../mgmt/trafficmanager/models/endpoint.py | 36 ++- ...endpoint_properties_custom_headers_item.py | 32 +++ .../trafficmanager/models/heat_map_model.py | 25 +-- .../trafficmanager/models/monitor_config.py | 12 +- .../monitor_config_custom_headers_item.py | 32 +++ ...config_expected_status_code_ranges_item.py | 32 +++ .../mgmt/trafficmanager/models/profile.py | 25 +-- .../trafficmanager/models/proxy_resource.py | 25 +-- .../mgmt/trafficmanager/models/resource.py | 29 +-- .../trafficmanager/models/tracked_resource.py | 25 +-- .../traffic_manager_geographic_hierarchy.py | 25 +-- .../traffic_manager_user_metrics_key_model.py | 48 ---- .../trafficmanager/operations/__init__.py | 2 - .../operations/endpoints_operations.py | 4 +- .../geographic_hierarchies_operations.py | 4 +- .../operations/heat_map_operations.py | 4 +- .../operations/profiles_operations.py | 4 +- ...ic_manager_user_metrics_keys_operations.py | 211 ------------------ .../traffic_manager_management_client.py | 6 +- .../azure/mgmt/trafficmanager/version.py | 2 +- 21 files changed, 197 insertions(+), 410 deletions(-) create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item.py delete mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py delete mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index 48762db4a915..fa11e1dddb8c 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -10,9 +10,16 @@ # -------------------------------------------------------------------------- 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 @@ -21,11 +28,6 @@ from .resource import Resource from .tracked_resource import TrackedResource from .proxy_resource import ProxyResource -from .heat_map_endpoint import HeatMapEndpoint -from .query_experience import QueryExperience -from .traffic_flow import TrafficFlow -from .heat_map_model import HeatMapModel -from .traffic_manager_user_metrics_key_model import TrafficManagerUserMetricsKeyModel from .profile_paged import ProfilePaged from .traffic_manager_management_client_enums import ( EndpointStatus, @@ -38,9 +40,16 @@ __all__ = [ 'DeleteOperationResult', + 'EndpointPropertiesCustomHeadersItem', + 'HeatMapEndpoint', + 'QueryExperience', + 'TrafficFlow', + 'HeatMapModel', 'Endpoint', 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters', 'DnsConfig', + 'MonitorConfigCustomHeadersItem', + 'MonitorConfigExpectedStatusCodeRangesItem', 'MonitorConfig', 'Profile', 'TrafficManagerNameAvailability', @@ -49,11 +58,6 @@ 'Resource', 'TrackedResource', 'ProxyResource', - 'HeatMapEndpoint', - 'QueryExperience', - 'TrafficFlow', - 'HeatMapModel', - 'TrafficManagerUserMetricsKeyModel', 'ProfilePaged', 'EndpointStatus', 'EndpointMonitorStatus', diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py index 2564e5b1271a..637bde5d7c4d 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -15,23 +15,20 @@ 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 @@ -64,14 +61,11 @@ class Endpoint(ProxyResource): 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] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -85,10 +79,11 @@ 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__() + def __init__(self, id=None, name=None, type=None, 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, custom_headers=None): + super(Endpoint, self).__init__(id=id, name=name, type=type) self.target_resource_id = target_resource_id self.target = target self.endpoint_status = endpoint_status @@ -98,3 +93,4 @@ def __init__(self, target_resource_id=None, target=None, endpoint_status=None, w 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/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..7f1aad4010ec --- /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, name=None, value=None): + super(EndpointPropertiesCustomHeadersItem, self).__init__() + self.name = name + self.value = value 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 index 68d9d427d563..5609e4da90c8 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py @@ -15,17 +15,14 @@ class HeatMapModel(ProxyResource): """Class representing a Traffic Manager HeatMap. - 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 start_time: The beginning of the time window for this HeatMap, inclusive. :type start_time: datetime @@ -39,12 +36,6 @@ class HeatMapModel(ProxyResource): :type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -55,8 +46,8 @@ class HeatMapModel(ProxyResource): 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, } - def __init__(self, start_time=None, end_time=None, endpoints=None, traffic_flows=None): - super(HeatMapModel, self).__init__() + def __init__(self, id=None, name=None, type=None, start_time=None, end_time=None, endpoints=None, traffic_flows=None): + super(HeatMapModel, self).__init__(id=id, name=name, type=type) self.start_time = start_time self.end_time = end_time self.endpoints = endpoints 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 594b7a50b28f..b2112ea0cf32 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py @@ -40,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 = { @@ -50,9 +56,11 @@ 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): + 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, custom_headers=None, expected_status_code_ranges=None): super(MonitorConfig, self).__init__() self.profile_monitor_status = profile_monitor_status self.protocol = protocol @@ -61,3 +69,5 @@ def __init__(self, profile_monitor_status=None, protocol=None, port=None, path=N 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/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..43ced4764469 --- /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, name=None, value=None): + super(MonitorConfigCustomHeadersItem, self).__init__() + 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..aba187dafbd6 --- /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, min=None, max=None): + super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__() + self.min = min + self.max = max diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index e92224bed00c..500ea7866490 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -15,17 +15,14 @@ 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[str, str] :param location: The Azure Region where the resource lives @@ -48,12 +45,6 @@ class Profile(TrackedResource): :type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint] """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -67,8 +58,8 @@ class Profile(TrackedResource): 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, } - 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) + def __init__(self, id=None, name=None, type=None, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None): + super(Profile, self).__init__(id=id, name=name, type=type, tags=tags, location=location) self.profile_status = profile_status self.traffic_routing_method = traffic_routing_method self.dns_config = dns_config 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..b5917c2e5b2f 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,15 @@ 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}, - } - - def __init__(self): - super(ProxyResource, self).__init__() + def __init__(self, id=None, name=None, type=None): + super(ProxyResource, self).__init__(id=id, name=name, type=type) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py index 65a2d08306a7..ca6c56126944 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -15,33 +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): + def __init__(self, id=None, name=None, type=None): super(Resource, self).__init__() - self.id = None - self.name = None - self.type = None + 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 2c42e3e2596b..3ca0626f147d 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[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__() + def __init__(self, id=None, name=None, type=None, tags=None, location=None): + super(TrackedResource, self).__init__(id=id, name=name, type=type) self.tags = tags self.location = location 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 81b91aa64873..6c9ebc52463f 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,28 +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: ~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'}, @@ -45,6 +36,6 @@ class TrafficManagerGeographicHierarchy(ProxyResource): 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, } - def __init__(self, geographic_hierarchy=None): - super(TrafficManagerGeographicHierarchy, self).__init__() + def __init__(self, id=None, name=None, type=None, geographic_hierarchy=None): + super(TrafficManagerGeographicHierarchy, self).__init__(id=id, name=name, type=type) self.geographic_hierarchy = geographic_hierarchy diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py deleted file mode 100644 index fa811f8e6df5..000000000000 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_user_metrics_key_model.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 TrafficManagerUserMetricsKeyModel(ProxyResource): - """Class representing a Traffic Manager Real User Metrics key response. - - 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 - - /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- - Microsoft.Network/trafficmanagerProfiles. - :vartype type: str - :param key: The key returned by the Real User Metrics operation. - :type key: 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'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, key=None): - super(TrafficManagerUserMetricsKeyModel, self).__init__() - self.key = key diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py index d81d2cc5a9ec..d337ba0ff8a0 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py @@ -13,12 +13,10 @@ from .profiles_operations import ProfilesOperations from .geographic_hierarchies_operations import GeographicHierarchiesOperations from .heat_map_operations import HeatMapOperations -from .traffic_manager_user_metrics_keys_operations import TrafficManagerUserMetricsKeysOperations __all__ = [ 'EndpointsOperations', 'ProfilesOperations', 'GeographicHierarchiesOperations', 'HeatMapOperations', - 'TrafficManagerUserMetricsKeysOperations', ] 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 9b284b6ef8e9..f4edba686289 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/endpoints_operations.py @@ -23,7 +23,7 @@ class EndpointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ models = models @@ -33,7 +33,7 @@ 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 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 841098e48668..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 @@ -23,7 +23,7 @@ class GeographicHierarchiesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ models = models @@ -33,7 +33,7 @@ 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 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 index 00c70e9e1935..0e2006fa2c8d 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/heat_map_operations.py @@ -24,7 +24,7 @@ class HeatMapOperations(object): :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: "2017-09-01-preview". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._serialize = serializer self._deserialize = deserializer self.heat_map_type = "default" - self.api_version = "2017-09-01-preview" + self.api_version = "2018-03-01" self.config = config 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 acff93e4b118..d7b1ab52f633 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/profiles_operations.py @@ -23,7 +23,7 @@ class ProfilesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-05-01". + :ivar api_version: Client Api Version. Constant value: "2018-03-01". """ models = models @@ -33,7 +33,7 @@ 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 diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py deleted file mode 100644 index 6ba71e3c074f..000000000000 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py +++ /dev/null @@ -1,211 +0,0 @@ -# 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 TrafficManagerUserMetricsKeysOperations(object): - """TrafficManagerUserMetricsKeysOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2017-09-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2017-09-01-preview" - - self.config = config - - def get( - self, custom_headers=None, raw=False, **operation_config): - """Get the subscription-level key used for Real User Metrics collection. - - :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: TrafficManagerUserMetricsKeyModel or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.trafficmanager.models.TrafficManagerUserMetricsKeyModel 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') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # 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('TrafficManagerUserMetricsKeyModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys'} - - def create_or_update( - self, custom_headers=None, raw=False, **operation_config): - """Create or update a subscription-level key used for Real User Metrics - collection. - - :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: TrafficManagerUserMetricsKeyModel or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.trafficmanager.models.TrafficManagerUserMetricsKeyModel or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # 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.put(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('TrafficManagerUserMetricsKeyModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys'} - - def delete( - self, custom_headers=None, raw=False, **operation_config): - """Delete a subscription-level key used for Real User Metrics collection. - - :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: DeleteOperationResult or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.trafficmanager.models.DeleteOperationResult or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # 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.delete(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('DeleteOperationResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys'} 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 7f0bc16c7ad1..c0fc6c42ee91 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 @@ -17,7 +17,6 @@ from .operations.profiles_operations import ProfilesOperations from .operations.geographic_hierarchies_operations import GeographicHierarchiesOperations from .operations.heat_map_operations import HeatMapOperations -from .operations.traffic_manager_user_metrics_keys_operations import TrafficManagerUserMetricsKeysOperations from . import models @@ -69,8 +68,6 @@ class TrafficManagerManagementClient(object): :vartype geographic_hierarchies: azure.mgmt.trafficmanager.operations.GeographicHierarchiesOperations :ivar heat_map: HeatMap operations :vartype heat_map: azure.mgmt.trafficmanager.operations.HeatMapOperations - :ivar traffic_manager_user_metrics_keys: TrafficManagerUserMetricsKeys operations - :vartype traffic_manager_user_metrics_keys: azure.mgmt.trafficmanager.operations.TrafficManagerUserMetricsKeysOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -89,6 +86,7 @@ def __init__( self._client = ServiceClient(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -100,5 +98,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.heat_map = HeatMapOperations( self._client, self.config, self._serialize, self._deserialize) - self.traffic_manager_user_metrics_keys = TrafficManagerUserMetricsKeysOperations( - 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 53a203f32aaf..89036952dd3c 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 = "" +VERSION = "2018-03-01" From feec8515c7976a6b02a3eddbf2e983585c1c1e38 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 11:38:15 -0700 Subject: [PATCH 3/6] Generated from 0a167ffd54481f34ac2101552224462d416857f1 (#2564) Adding 2018-02-01 Traffic Manager API version. --- .../azure/mgmt/trafficmanager/models/__init__.py | 2 ++ .../azure/mgmt/trafficmanager/models/profile.py | 10 +++++++++- .../models/traffic_manager_management_client_enums.py | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index fa11e1dddb8c..106dfc587deb 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -36,6 +36,7 @@ MonitorProtocol, ProfileStatus, TrafficRoutingMethod, + TrafficViewEnrollmentStatus, ) __all__ = [ @@ -65,4 +66,5 @@ 'MonitorProtocol', 'ProfileStatus', 'TrafficRoutingMethod', + 'TrafficViewEnrollmentStatus', ] diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index 500ea7866490..6537f883e885 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -43,6 +43,12 @@ class Profile(TrackedResource): :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 = { @@ -56,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, id=None, name=None, type=None, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None): + def __init__(self, id=None, name=None, type=None, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None, traffic_view_enrollment_status=None): super(Profile, self).__init__(id=id, name=name, type=type, 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 + self.traffic_view_enrollment_status = traffic_view_enrollment_status 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..2b16997c3714 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 @@ -56,3 +56,9 @@ class TrafficRoutingMethod(Enum): priority = "Priority" weighted = "Weighted" geographic = "Geographic" + + +class TrafficViewEnrollmentStatus(Enum): + + enabled = "Enabled" + disabled = "Disabled" From d498e2b15e0b343c9546b8a13213e51a20d28914 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 25 May 2018 18:29:11 +0000 Subject: [PATCH 4/6] Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/2038 --- .../mgmt/trafficmanager/models/__init__.py | 59 ++++++++---- ...lative_dns_name_availability_parameters.py | 8 +- ...ve_dns_name_availability_parameters_py3.py | 32 +++++++ .../models/delete_operation_result.py | 4 +- .../models/delete_operation_result_py3.py | 35 +++++++ .../mgmt/trafficmanager/models/dns_config.py | 8 +- .../trafficmanager/models/dns_config_py3.py | 50 ++++++++++ .../mgmt/trafficmanager/models/endpoint.py | 24 ++--- ...endpoint_properties_custom_headers_item.py | 8 +- ...oint_properties_custom_headers_item_py3.py | 32 +++++++ .../trafficmanager/models/endpoint_py3.py | 96 +++++++++++++++++++ .../models/heat_map_endpoint.py | 8 +- .../models/heat_map_endpoint_py3.py | 33 +++++++ .../trafficmanager/models/heat_map_model.py | 12 +-- .../models/heat_map_model_py3.py | 54 +++++++++++ .../trafficmanager/models/monitor_config.py | 22 ++--- .../monitor_config_custom_headers_item.py | 8 +- .../monitor_config_custom_headers_item_py3.py | 32 +++++++ ...config_expected_status_code_ranges_item.py | 8 +- ...ig_expected_status_code_ranges_item_py3.py | 32 +++++++ .../models/monitor_config_py3.py | 73 ++++++++++++++ .../mgmt/trafficmanager/models/profile.py | 16 ++-- .../mgmt/trafficmanager/models/profile_py3.py | 75 +++++++++++++++ .../trafficmanager/models/proxy_resource.py | 10 +- .../models/proxy_resource_py3.py | 36 +++++++ .../trafficmanager/models/query_experience.py | 19 ++-- .../models/query_experience_py3.py | 46 +++++++++ .../mgmt/trafficmanager/models/region.py | 10 +- .../mgmt/trafficmanager/models/region_py3.py | 38 ++++++++ .../mgmt/trafficmanager/models/resource.py | 10 +- .../trafficmanager/models/resource_py3.py | 38 ++++++++ .../trafficmanager/models/tracked_resource.py | 8 +- .../models/tracked_resource_py3.py | 43 +++++++++ .../trafficmanager/models/traffic_flow.py | 12 +-- .../trafficmanager/models/traffic_flow_py3.py | 45 +++++++++ .../traffic_manager_geographic_hierarchy.py | 6 +- ...raffic_manager_geographic_hierarchy_py3.py | 41 ++++++++ ...traffic_manager_management_client_enums.py | 14 +-- .../traffic_manager_name_availability.py | 14 +-- .../traffic_manager_name_availability_py3.py | 46 +++++++++ .../traffic_manager_management_client.py | 6 +- 41 files changed, 1039 insertions(+), 132 deletions(-) create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/check_traffic_manager_relative_dns_name_availability_parameters_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/delete_operation_result_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/dns_config_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_custom_headers_item_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_custom_headers_item_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_expected_status_code_ranges_item_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_geographic_hierarchy_py3.py create mode 100644 azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_manager_name_availability_py3.py diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index 106dfc587deb..16e7f531c796 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -9,25 +9,46 @@ # regenerated. # -------------------------------------------------------------------------- -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 +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, 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 2e199f1405a7..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,7 +26,7 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type=None): - super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__() - 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 b2808ae43edd..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,6 +30,6 @@ class DeleteOperationResult(Model): 'operation_result': {'key': 'boolean', 'type': 'bool'}, } - def __init__(self): - super(DeleteOperationResult, self).__init__() + 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 136d75ef7467..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,8 +43,8 @@ class DnsConfig(Model): 'ttl': {'key': 'ttl', 'type': 'long'}, } - def __init__(self, relative_name=None, ttl=None): - super(DnsConfig, self).__init__() - 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 637bde5d7c4d..0054ed7b772b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -82,15 +82,15 @@ class Endpoint(ProxyResource): 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, } - def __init__(self, id=None, name=None, type=None, 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, custom_headers=None): - super(Endpoint, self).__init__(id=id, name=name, type=type) - 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 + 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 index 7f1aad4010ec..ac5b3c43ed1a 100644 --- 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 @@ -26,7 +26,7 @@ class EndpointPropertiesCustomHeadersItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(EndpointPropertiesCustomHeadersItem, self).__init__() - self.name = name - self.value = value + 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 index 1cb860b3e689..add3cf93b309 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_endpoint.py @@ -27,7 +27,7 @@ class HeatMapEndpoint(Model): 'endpoint_id': {'key': 'endpointId', 'type': 'int'}, } - def __init__(self, resource_id=None, endpoint_id=None): - super(HeatMapEndpoint, self).__init__() - self.resource_id = resource_id - self.endpoint_id = endpoint_id + 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 index 5609e4da90c8..255716b0acd9 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/heat_map_model.py @@ -46,9 +46,9 @@ class HeatMapModel(ProxyResource): 'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'}, } - def __init__(self, id=None, name=None, type=None, start_time=None, end_time=None, endpoints=None, traffic_flows=None): - super(HeatMapModel, self).__init__(id=id, name=name, type=type) - self.start_time = start_time - self.end_time = end_time - self.endpoints = endpoints - self.traffic_flows = traffic_flows + 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 b2112ea0cf32..829c3bc20ec4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/monitor_config.py @@ -60,14 +60,14 @@ class MonitorConfig(Model): '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, custom_headers=None, expected_status_code_ranges=None): - super(MonitorConfig, self).__init__() - 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 + 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 index 43ced4764469..e98f2ae02d49 100644 --- 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 @@ -26,7 +26,7 @@ class MonitorConfigCustomHeadersItem(Model): 'value': {'key': 'value', 'type': 'str'}, } - def __init__(self, name=None, value=None): - super(MonitorConfigCustomHeadersItem, self).__init__() - self.name = name - self.value = value + 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 index aba187dafbd6..a5276d230394 100644 --- 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 @@ -26,7 +26,7 @@ class MonitorConfigExpectedStatusCodeRangesItem(Model): 'max': {'key': 'max', 'type': 'int'}, } - def __init__(self, min=None, max=None): - super(MonitorConfigExpectedStatusCodeRangesItem, self).__init__() - self.min = min - self.max = max + 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 6537f883e885..5c5831e70ccd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -65,11 +65,11 @@ class Profile(TrackedResource): 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, } - def __init__(self, id=None, name=None, type=None, tags=None, location=None, profile_status=None, traffic_routing_method=None, dns_config=None, monitor_config=None, endpoints=None, traffic_view_enrollment_status=None): - super(Profile, self).__init__(id=id, name=name, type=type, 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 - self.traffic_view_enrollment_status = traffic_view_enrollment_status + 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_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 b5917c2e5b2f..6c28b1486d47 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py @@ -26,5 +26,11 @@ class ProxyResource(Resource): :type type: str """ - def __init__(self, id=None, name=None, type=None): - super(ProxyResource, self).__init__(id=id, name=name, type=type) + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + 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 index 914486c5cd96..18f8555520a1 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/query_experience.py @@ -15,10 +15,13 @@ class QueryExperience(Model): """Class representing a Traffic Manager HeatMap query experience properties. - :param endpoint_id: The id of the endpoint from the 'endpoints' array - which these queries were routed to. + 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: The number of queries originating from this location. + :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. @@ -36,8 +39,8 @@ class QueryExperience(Model): 'latency': {'key': 'latency', 'type': 'float'}, } - def __init__(self, endpoint_id, query_count, latency=None): - super(QueryExperience, self).__init__() - self.endpoint_id = endpoint_id - self.query_count = query_count - self.latency = latency + 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 60627f16fc66..1e358a541bfd 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/region.py @@ -31,8 +31,8 @@ class Region(Model): 'regions': {'key': 'regions', 'type': '[Region]'}, } - def __init__(self, code=None, name=None, regions=None): - super(Region, self).__init__() - 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 ca6c56126944..e69909f81f81 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -31,8 +31,8 @@ class Resource(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, id=None, name=None, type=None): - super(Resource, self).__init__() - self.id = id - self.name = name - self.type = type + 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 3ca0626f147d..0400b888df53 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py @@ -37,7 +37,7 @@ class TrackedResource(Resource): 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, id=None, name=None, type=None, tags=None, location=None): - super(TrackedResource, self).__init__(id=id, name=name, type=type) - 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 index 85651d2feed2..0c32b8cac1d3 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/traffic_flow.py @@ -37,9 +37,9 @@ class TrafficFlow(Model): 'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'}, } - def __init__(self, source_ip=None, latitude=None, longitude=None, query_experiences=None): - super(TrafficFlow, self).__init__() - self.source_ip = source_ip - self.latitude = latitude - self.longitude = longitude - self.query_experiences = query_experiences + 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 6c9ebc52463f..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 @@ -36,6 +36,6 @@ class TrafficManagerGeographicHierarchy(ProxyResource): 'geographic_hierarchy': {'key': 'properties.geographicHierarchy', 'type': 'Region'}, } - def __init__(self, id=None, name=None, type=None, geographic_hierarchy=None): - super(TrafficManagerGeographicHierarchy, self).__init__(id=id, name=name, type=type) - 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 2b16997c3714..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,20 +37,20 @@ 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" @@ -58,7 +58,7 @@ class TrafficRoutingMethod(Enum): geographic = "Geographic" -class TrafficViewEnrollmentStatus(Enum): +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 da80f7134ce0..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,10 +37,10 @@ class TrafficManagerNameAvailability(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, name=None, type=None, name_available=None, reason=None, message=None): - super(TrafficManagerNameAvailability, self).__init__() - 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/traffic_manager_management_client.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/traffic_manager_management_client.py index c0fc6c42ee91..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,7 +9,7 @@ # 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 @@ -54,7 +54,7 @@ def __init__( self.subscription_id = subscription_id -class TrafficManagerManagementClient(object): +class TrafficManagerManagementClient(SDKClient): """TrafficManagerManagementClient :ivar config: Configuration for client. @@ -83,7 +83,7 @@ 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 = '2018-03-01' From 0df10aa971e01424d0b06960f624c98cc8af2662 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 25 May 2018 12:08:23 -0700 Subject: [PATCH 5/6] azure-mgmt-trafficmanager packaging --- azure-mgmt-trafficmanager/README.rst | 6 +++--- azure-mgmt-trafficmanager/sdk_packaging.toml | 5 +++++ azure-mgmt-trafficmanager/setup.py | 9 ++++----- 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 azure-mgmt-trafficmanager/sdk_packaging.toml 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/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 ) From 023e3be90576706b80709c068fddf82b98d561d9 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 25 May 2018 12:14:07 -0700 Subject: [PATCH 6/6] azure-mgmt-trafficmanager 0.50.0 --- azure-mgmt-trafficmanager/HISTORY.rst | 42 ++++ .../azure/mgmt/trafficmanager/version.py | 2 +- azure-mgmt-trafficmanager/build.json | 225 ------------------ 3 files changed, 43 insertions(+), 226 deletions(-) delete mode 100644 azure-mgmt-trafficmanager/build.json 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/azure/mgmt/trafficmanager/version.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/version.py index 89036952dd3c..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 = "2018-03-01" +VERSION = "0.50.0" diff --git a/azure-mgmt-trafficmanager/build.json b/azure-mgmt-trafficmanager/build.json deleted file mode 100644 index d5356f60b700..000000000000 --- a/azure-mgmt-trafficmanager/build.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", - "@types/commonmark": "^0.27.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.19", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file