diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py index 16e7f531c796..deb854495dc5 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/__init__.py @@ -11,11 +11,13 @@ try: from .delete_operation_result_py3 import DeleteOperationResult + from .endpoint_properties_subnets_item_py3 import EndpointPropertiesSubnetsItem 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 .user_metrics_model_py3 import UserMetricsModel from .endpoint_py3 import Endpoint from .check_traffic_manager_relative_dns_name_availability_parameters_py3 import CheckTrafficManagerRelativeDnsNameAvailabilityParameters from .dns_config_py3 import DnsConfig @@ -31,11 +33,13 @@ from .proxy_resource_py3 import ProxyResource except (SyntaxError, ImportError): from .delete_operation_result import DeleteOperationResult + from .endpoint_properties_subnets_item import EndpointPropertiesSubnetsItem 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 .user_metrics_model import UserMetricsModel from .endpoint import Endpoint from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters from .dns_config import DnsConfig @@ -62,11 +66,13 @@ __all__ = [ 'DeleteOperationResult', + 'EndpointPropertiesSubnetsItem', 'EndpointPropertiesCustomHeadersItem', 'HeatMapEndpoint', 'QueryExperience', 'TrafficFlow', 'HeatMapModel', + 'UserMetricsModel', 'Endpoint', 'CheckTrafficManagerRelativeDnsNameAvailabilityParameters', 'DnsConfig', diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py index 0054ed7b772b..a9ad3a4166e4 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint.py @@ -15,14 +15,17 @@ class Endpoint(ProxyResource): """Class representing a Traffic Manager endpoint. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype 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 @@ -38,14 +41,14 @@ class Endpoint(ProxyResource): :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’ + :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. + 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', @@ -58,14 +61,25 @@ class Endpoint(ProxyResource): '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 + 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 subnets: The list of subnets, IP addresses, and/or address ranges + mapped to this endpoint when using the 'Subnet' traffic routing method. An + empty list will match all ranges not covered by other endpoints. + :type subnets: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesSubnetsItem] :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'}, @@ -79,6 +93,7 @@ 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]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[EndpointPropertiesSubnetsItem]'}, 'custom_headers': {'key': 'properties.customHeaders', 'type': '[EndpointPropertiesCustomHeadersItem]'}, } @@ -93,4 +108,5 @@ def __init__(self, **kwargs): 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.subnets = kwargs.get('subnets', None) self.custom_headers = kwargs.get('custom_headers', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_subnets_item.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_subnets_item.py new file mode 100644 index 000000000000..b6995afc2c01 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_subnets_item.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 msrest.serialization import Model + + +class EndpointPropertiesSubnetsItem(Model): + """Subnet first address, scope, and/or last address. + + :param first: First address in the subnet. + :type first: str + :param last: Last address in the subnet. + :type last: str + :param scope: Block size (number of leading bits in the subnet mask). + :type scope: int + """ + + _attribute_map = { + 'first': {'key': 'first', 'type': 'str'}, + 'last': {'key': 'last', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(EndpointPropertiesSubnetsItem, self).__init__(**kwargs) + self.first = kwargs.get('first', None) + self.last = kwargs.get('last', None) + self.scope = kwargs.get('scope', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_subnets_item_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_subnets_item_py3.py new file mode 100644 index 000000000000..e22d9e74ba1d --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_properties_subnets_item_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 msrest.serialization import Model + + +class EndpointPropertiesSubnetsItem(Model): + """Subnet first address, scope, and/or last address. + + :param first: First address in the subnet. + :type first: str + :param last: Last address in the subnet. + :type last: str + :param scope: Block size (number of leading bits in the subnet mask). + :type scope: int + """ + + _attribute_map = { + 'first': {'key': 'first', 'type': 'str'}, + 'last': {'key': 'last', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'int'}, + } + + def __init__(self, *, first: str=None, last: str=None, scope: int=None, **kwargs) -> None: + super(EndpointPropertiesSubnetsItem, self).__init__(**kwargs) + self.first = first + self.last = last + self.scope = scope diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py index 367993bbf1c5..6bc70c2fbccf 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/endpoint_py3.py @@ -15,14 +15,17 @@ class Endpoint(ProxyResource): """Class representing a Traffic Manager endpoint. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype 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 @@ -38,14 +41,14 @@ class Endpoint(ProxyResource): :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’ + :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. + 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', @@ -58,14 +61,25 @@ class Endpoint(ProxyResource): '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 + 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 subnets: The list of subnets, IP addresses, and/or address ranges + mapped to this endpoint when using the 'Subnet' traffic routing method. An + empty list will match all ranges not covered by other endpoints. + :type subnets: + list[~azure.mgmt.trafficmanager.models.EndpointPropertiesSubnetsItem] :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'}, @@ -79,11 +93,12 @@ 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]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[EndpointPropertiesSubnetsItem]'}, '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) + def __init__(self, *, 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, subnets=None, custom_headers=None, **kwargs) -> None: + super(Endpoint, self).__init__(**kwargs) self.target_resource_id = target_resource_id self.target = target self.endpoint_status = endpoint_status @@ -93,4 +108,5 @@ def __init__(self, *, id: str=None, name: str=None, type: str=None, target_resou self.endpoint_monitor_status = endpoint_monitor_status self.min_child_endpoints = min_child_endpoints self.geo_mapping = geo_mapping + self.subnets = subnets self.custom_headers = custom_headers 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 255716b0acd9..662f21516c63 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,14 +15,17 @@ class HeatMapModel(ProxyResource): """Class representing a Traffic Manager HeatMap. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype type: str :param start_time: The beginning of the time window for this HeatMap, inclusive. :type start_time: datetime @@ -36,6 +39,12 @@ 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'}, 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 index c5a47ad4f537..76d89170dab2 100644 --- 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 @@ -15,14 +15,17 @@ class HeatMapModel(ProxyResource): """Class representing a Traffic Manager HeatMap. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype type: str :param start_time: The beginning of the time window for this HeatMap, inclusive. :type start_time: datetime @@ -36,6 +39,12 @@ 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'}, @@ -46,8 +55,8 @@ class HeatMapModel(ProxyResource): '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) + def __init__(self, *, start_time=None, end_time=None, endpoints=None, traffic_flows=None, **kwargs) -> None: + super(HeatMapModel, self).__init__(**kwargs) self.start_time = start_time self.end_time = end_time self.endpoints = endpoints diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py index 5c5831e70ccd..6cf1f5fdcdaf 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile.py @@ -15,14 +15,17 @@ class Profile(TrackedResource): """Class representing a Traffic Manager profile. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] :param location: The Azure Region where the resource lives @@ -33,7 +36,7 @@ class Profile(TrackedResource): ~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' + 'Weighted', 'Geographic', 'MultiValue', 'Subnet' :type traffic_routing_method: str or ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod :param dns_config: The DNS settings of the Traffic Manager profile. @@ -49,8 +52,17 @@ class Profile(TrackedResource): Manage profile. Possible values include: 'Enabled', 'Disabled' :type traffic_view_enrollment_status: str or ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus + :param max_return: Maximum number of endpoints to be returned for + MultiValue routing type. + :type max_return: long """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -63,6 +75,7 @@ class Profile(TrackedResource): 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, + 'max_return': {'key': 'properties.maxReturn', 'type': 'long'}, } def __init__(self, **kwargs): @@ -73,3 +86,4 @@ def __init__(self, **kwargs): 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) + self.max_return = kwargs.get('max_return', 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 index f412c1e65900..68d96a21c91b 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/profile_py3.py @@ -15,14 +15,17 @@ class Profile(TrackedResource): """Class representing a Traffic Manager profile. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] :param location: The Azure Region where the resource lives @@ -33,7 +36,7 @@ class Profile(TrackedResource): ~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' + 'Weighted', 'Geographic', 'MultiValue', 'Subnet' :type traffic_routing_method: str or ~azure.mgmt.trafficmanager.models.TrafficRoutingMethod :param dns_config: The DNS settings of the Traffic Manager profile. @@ -49,8 +52,17 @@ class Profile(TrackedResource): Manage profile. Possible values include: 'Enabled', 'Disabled' :type traffic_view_enrollment_status: str or ~azure.mgmt.trafficmanager.models.TrafficViewEnrollmentStatus + :param max_return: Maximum number of endpoints to be returned for + MultiValue routing type. + :type max_return: long """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -63,13 +75,15 @@ class Profile(TrackedResource): 'monitor_config': {'key': 'properties.monitorConfig', 'type': 'MonitorConfig'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, 'traffic_view_enrollment_status': {'key': 'properties.trafficViewEnrollmentStatus', 'type': 'str'}, + 'max_return': {'key': 'properties.maxReturn', 'type': 'long'}, } - 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) + def __init__(self, *, 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, max_return: int=None, **kwargs) -> None: + super(Profile, self).__init__(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 + self.max_return = max_return 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 6c28b1486d47..902cb0f9ea06 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource.py @@ -16,16 +16,25 @@ 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 - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 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 index 2ddbec4c9593..bc08ea3fc2a0 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/proxy_resource_py3.py @@ -16,21 +16,30 @@ 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 - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype 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, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: - super(ProxyResource, self).__init__(id=id, name=name, type=type, **kwargs) + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py index e69909f81f81..ccbfc099c6ab 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource.py @@ -15,16 +15,25 @@ class Resource(Model): """The core properties of ARM resources. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype type: str """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, @@ -33,6 +42,6 @@ class Resource(Model): 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) + self.id = None + self.name = None + self.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 index b3b3eb79ac2c..b5f4668f98a6 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/resource_py3.py @@ -15,24 +15,33 @@ class Resource(Model): """The core properties of ARM resources. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype 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, *, id: str=None, name: str=None, type: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(Resource, self).__init__(**kwargs) - self.id = id - self.name = name - self.type = type + 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 0400b888df53..7dbcd1d8dc24 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource.py @@ -15,20 +15,29 @@ class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype 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'}, 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 index 90ace2635832..7f001a858dd2 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/tracked_resource_py3.py @@ -15,20 +15,29 @@ class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. - :param id: Fully qualified resource Id for the resource. Ex - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :vartype 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'}, @@ -37,7 +46,7 @@ class TrackedResource(Resource): '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) + def __init__(self, *, tags=None, location: str=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) 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 11d886c49f10..ba374ddef555 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,19 +16,28 @@ 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 - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :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: ~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'}, 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 index 142fffe5f15b..a154dd80d3d6 100644 --- 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 @@ -16,19 +16,28 @@ 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 - + 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} - :type id: str - :param name: The name of the resource - :type name: str - :param type: The type of the resource. Ex- + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- Microsoft.Network/trafficmanagerProfiles. - :type type: str + :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: ~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'}, @@ -36,6 +45,6 @@ class TrafficManagerGeographicHierarchy(ProxyResource): '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) + def __init__(self, *, geographic_hierarchy=None, **kwargs) -> None: + super(TrafficManagerGeographicHierarchy, self).__init__(**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 5efc19f68740..4d148f1bb617 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,6 +56,8 @@ class TrafficRoutingMethod(str, Enum): priority = "Priority" weighted = "Weighted" geographic = "Geographic" + multi_value = "MultiValue" + subnet = "Subnet" class TrafficViewEnrollmentStatus(str, Enum): diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/user_metrics_model.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/user_metrics_model.py new file mode 100644 index 000000000000..6d0cf45fa7f8 --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/user_metrics_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 UserMetricsModel(ProxyResource): + """Class representing Traffic Manager User Metrics. + + 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 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': 'properties.key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UserMetricsModel, self).__init__(**kwargs) + self.key = kwargs.get('key', None) diff --git a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/user_metrics_model_py3.py b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/user_metrics_model_py3.py new file mode 100644 index 000000000000..903c3dd33f5c --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/models/user_metrics_model_py3.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_py3 import ProxyResource + + +class UserMetricsModel(ProxyResource): + """Class representing Traffic Manager User Metrics. + + 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 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': 'properties.key', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, **kwargs) -> None: + super(UserMetricsModel, self).__init__(**kwargs) + 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 d337ba0ff8a0..d81d2cc5a9ec 100644 --- a/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/__init__.py @@ -13,10 +13,12 @@ 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 f4edba686289..611b7d6c4f60 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: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2018-04-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 = "2018-03-01" + self.api_version = "2018-04-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 48ec79c5cc6f..a90d44dae744 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: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2018-04-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 = "2018-03-01" + self.api_version = "2018-04-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 0e2006fa2c8d..943b4bfbf814 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: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2018-04-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 = "2018-03-01" + self.api_version = "2018-04-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 d7b1ab52f633..76e370708b55 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: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2018-04-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 = "2018-03-01" + self.api_version = "2018-04-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 new file mode 100644 index 000000000000..d785370696fa --- /dev/null +++ b/azure-mgmt-trafficmanager/azure/mgmt/trafficmanager/operations/traffic_manager_user_metrics_keys_operations.py @@ -0,0 +1,207 @@ +# 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: "2018-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-04-01" + + 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: UserMetricsModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.UserMetricsModel 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('UserMetricsModel', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficManagerUserMetricsKeys/default'} + + 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: UserMetricsModel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.trafficmanager.models.UserMetricsModel 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('UserMetricsModel', 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/default'} + + 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/default'} 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 5982206b29ae..a9f96e5fa87d 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,6 +17,7 @@ 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 @@ -68,6 +69,8 @@ class TrafficManagerManagementClient(SDKClient): :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 @@ -86,7 +89,7 @@ def __init__( 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' + self.api_version = '2018-04-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -98,3 +101,5 @@ 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 1002e003856c..b04095332b31 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.50.0" +VERSION = "2018-04-01"