diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py index b1b257d96d00..f1bea839b13c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py @@ -94,7 +94,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 = '2017-04-02' + self.api_version = '2017-10-12' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -134,7 +134,7 @@ def check_name_availability( check_name_availability_input = models.CheckNameAvailabilityInput(name=name) # Construct URL - url = '/providers/Microsoft.Cdn/checkNameAvailability' + url = self.check_name_availability.metadata['url'] # Construct parameters query_parameters = {} @@ -171,6 +171,7 @@ def check_name_availability( return client_raw_response return deserialized + check_name_availability.metadata = {'url': '/providers/Microsoft.Cdn/checkNameAvailability'} def validate_probe( self, probe_url, custom_headers=None, raw=False, **operation_config): @@ -196,7 +197,7 @@ def validate_probe( validate_probe_input = models.ValidateProbeInput(probe_url=probe_url) # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe' + url = self.validate_probe.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -237,3 +238,4 @@ def validate_probe( return client_raw_response return deserialized + validate_probe.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 9d21eedae8cb..b1bc0400b34d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -17,7 +17,17 @@ from .deep_created_origin import DeepCreatedOrigin from .endpoint import Endpoint from .geo_filter import GeoFilter +from .delivery_rule_action import DeliveryRuleAction +from .delivery_rule_condition import DeliveryRuleCondition +from .delivery_rule import DeliveryRule +from .endpoint_properties_update_parameters_delivery_policy import EndpointPropertiesUpdateParametersDeliveryPolicy from .endpoint_update_parameters import EndpointUpdateParameters +from .url_path_condition_parameters import UrlPathConditionParameters +from .delivery_rule_url_path_condition import DeliveryRuleUrlPathCondition +from .url_file_extension_condition_parameters import UrlFileExtensionConditionParameters +from .delivery_rule_url_file_extension_condition import DeliveryRuleUrlFileExtensionCondition +from .cache_expiration_action_parameters import CacheExpirationActionParameters +from .delivery_rule_cache_expiration_action import DeliveryRuleCacheExpirationAction from .purge_parameters import PurgeParameters from .load_parameters import LoadParameters from .origin import Origin @@ -70,7 +80,17 @@ 'DeepCreatedOrigin', 'Endpoint', 'GeoFilter', + 'DeliveryRuleAction', + 'DeliveryRuleCondition', + 'DeliveryRule', + 'EndpointPropertiesUpdateParametersDeliveryPolicy', 'EndpointUpdateParameters', + 'UrlPathConditionParameters', + 'DeliveryRuleUrlPathCondition', + 'UrlFileExtensionConditionParameters', + 'DeliveryRuleUrlFileExtensionCondition', + 'CacheExpirationActionParameters', + 'DeliveryRuleCacheExpirationAction', 'PurgeParameters', 'LoadParameters', 'Origin', diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py new file mode 100644 index 000000000000..5dc30b20bc68 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -0,0 +1,56 @@ +# 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 CacheExpirationActionParameters(Model): + """Defines the parameters for the cache expiration action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar odatatype: Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + :vartype odatatype: str + :param cache_behavior: Caching behavior for the requests that include + query strings. Possible values include: 'BypassCache', 'Override', + 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.enum + :ivar cache_type: The level at which the content needs to be cached. + Default value: "All" . + :vartype cache_type: str + :param cache_duration: The duration for which the the content needs to be + cached. Allowed format is [d.]hh:mm:ss + :type cache_duration: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'cache_behavior': {'required': True}, + 'cache_type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'cache_behavior': {'key': 'cacheBehavior', 'type': 'str'}, + 'cache_type': {'key': 'cacheType', 'type': 'str'}, + 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + + cache_type = "All" + + def __init__(self, cache_behavior, cache_duration=None): + super(CacheExpirationActionParameters, self).__init__() + self.cache_behavior = cache_behavior + self.cache_duration = cache_duration diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py new file mode 100644 index 000000000000..0af95b4289ef --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRule(Model): + """A rule that specifies a set of actions and conditions. + + :param order: The order in which the rules are applied for the endpoint. + Possible values {0,1,2,3,………}. A rule with a lesser order will be applied + before a rule with a greater order. Rule with order 0 is a special rule. + It does not require any condition and actions listed in it will always be + applied. + :type order: int + :param actions: A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] + :param conditions: A list of conditions that must be matched for the + actions to be executed + :type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition] + """ + + _validation = { + 'order': {'required': True}, + 'actions': {'required': True}, + } + + _attribute_map = { + 'order': {'key': 'order', 'type': 'int'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, + 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + } + + def __init__(self, order, actions, conditions=None): + super(DeliveryRule, self).__init__() + self.order = order + self.actions = actions + self.conditions = conditions diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py new file mode 100644 index 000000000000..f06c68c0808c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py @@ -0,0 +1,39 @@ +# 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 DeliveryRuleAction(Model): + """An action for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleCacheExpirationAction + + :param name: Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + } + + def __init__(self): + super(DeliveryRuleAction, self).__init__() + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py new file mode 100644 index 000000000000..733cd1979c09 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_expiration_action.py @@ -0,0 +1,37 @@ +# 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 .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleCacheExpirationAction(DeliveryRuleAction): + """Defines the cache expiration action for the delivery rule. + + :param name: Constant filled by server. + :type name: str + :param parameters: Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheExpirationActionParameters'}, + } + + def __init__(self, parameters): + super(DeliveryRuleCacheExpirationAction, self).__init__() + self.parameters = parameters + self.name = 'CacheExpiration' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py new file mode 100644 index 000000000000..214aa77748b2 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeliveryRuleCondition(Model): + """A condition for the delivery rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition + + :param name: Constant filled by server. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + } + + def __init__(self): + super(DeliveryRuleCondition, self).__init__() + self.name = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py new file mode 100644 index 000000000000..f01fd3c579fd --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): + """Defines the URL file extension condition for the delivery rule. + + :param name: Constant filled by server. + :type name: str + :param parameters: Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + } + + def __init__(self, parameters): + super(DeliveryRuleUrlFileExtensionCondition, self).__init__() + self.parameters = parameters + self.name = 'UrlFileExtension' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py new file mode 100644 index 000000000000..f23ff25bce7c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py @@ -0,0 +1,37 @@ +# 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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): + """Defines the URL path condition for the delivery rule. + + :param name: Constant filled by server. + :type name: str + :param parameters: Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + } + + def __init__(self, parameters): + super(DeliveryRuleUrlPathCondition, self).__init__() + self.parameters = parameters + self.name = 'UrlPath' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py index 254a295a45a8..64da0cdcda8c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py @@ -79,6 +79,10 @@ class Endpoint(TrackedResource): CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy :ivar host_name: The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. consoto.azureedge.net :vartype host_name: str @@ -120,13 +124,14 @@ class Endpoint(TrackedResource): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, location, origins, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None): + def __init__(self, location, origins, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None, delivery_policy=None): super(Endpoint, self).__init__(location=location, tags=tags) self.origin_host_header = origin_host_header self.origin_path = origin_path @@ -138,6 +143,7 @@ def __init__(self, location, origins, tags=None, origin_host_header=None, origin self.optimization_type = optimization_type self.probe_path = probe_path self.geo_filters = geo_filters + self.delivery_policy = delivery_policy self.host_name = None self.origins = origins self.resource_state = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.py new file mode 100644 index 000000000000..095fa0760e71 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_properties_update_parameters_delivery_policy.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 EndpointPropertiesUpdateParametersDeliveryPolicy(Model): + """A policy that specifies the delivery rules to be used for an endpoint. + + :param description: User-friendly description of the policy. + :type description: str + :param rules: A list of the delivery rules. + :type rules: list[~azure.mgmt.cdn.models.DeliveryRule] + """ + + _validation = { + 'rules': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[DeliveryRule]'}, + } + + def __init__(self, rules, description=None): + super(EndpointPropertiesUpdateParametersDeliveryPolicy, self).__init__() + self.description = description + self.rules = rules diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py index d4002dc577d3..0e5d38bf6a13 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py @@ -65,6 +65,10 @@ class EndpointUpdateParameters(Model): CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param delivery_policy: A policy that specifies the delivery rules to be + used for an endpoint. + :type delivery_policy: + ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy """ _attribute_map = { @@ -79,9 +83,10 @@ class EndpointUpdateParameters(Model): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, } - def __init__(self, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None): + def __init__(self, tags=None, origin_host_header=None, origin_path=None, content_types_to_compress=None, is_compression_enabled=None, is_http_allowed=None, is_https_allowed=None, query_string_caching_behavior=None, optimization_type=None, probe_path=None, geo_filters=None, delivery_policy=None): super(EndpointUpdateParameters, self).__init__() self.tags = tags self.origin_host_header = origin_host_header @@ -94,3 +99,4 @@ def __init__(self, tags=None, origin_host_header=None, origin_path=None, content self.optimization_type = optimization_type self.probe_path = probe_path self.geo_filters = geo_filters + self.delivery_policy = delivery_policy diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py new file mode 100644 index 000000000000..af5ed66f303b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py @@ -0,0 +1,44 @@ +# 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 UrlFileExtensionConditionParameters(Model): + """Defines the parameters for the URL file extension condition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar odatatype: Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + . + :vartype odatatype: str + :param extensions: A list of extensions for the condition of the delivery + rule. + :type extensions: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'extensions': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'extensions': {'key': 'extensions', 'type': '[str]'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" + + def __init__(self, extensions): + super(UrlFileExtensionConditionParameters, self).__init__() + self.extensions = extensions diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py new file mode 100644 index 000000000000..9b86714f32cc --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.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 msrest.serialization import Model + + +class UrlPathConditionParameters(Model): + """Defines the parameters for the URL path condition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar odatatype: Default value: + "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . + :vartype odatatype: str + :param path: A URL path for the condition of the delivery rule + :type path: str + :param match_type: The match type for the condition of the delivery rule. + Possible values include: 'Literal', 'Wildcard' + :type match_type: str or ~azure.mgmt.cdn.models.enum + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'path': {'required': True}, + 'match_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'match_type': {'key': 'matchType', 'type': 'str'}, + } + + odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" + + def __init__(self, path, match_type): + super(UrlPathConditionParameters, self).__init__() + self.path = path + self.match_type = match_type diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index b534972bf147..543897ed8eb4 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -23,8 +23,8 @@ class CustomDomainsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -66,7 +66,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains' + url = self.list_by_endpoint.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -112,6 +112,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains'} def get( self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): @@ -141,7 +142,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -182,6 +183,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} def _create_initial( @@ -189,7 +191,7 @@ def _create_initial( custom_domain_properties = models.CustomDomainParameters(host_name=host_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -315,12 +317,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} def _delete_initial( self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -434,6 +437,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} def disable_custom_https( self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): @@ -463,7 +467,7 @@ def disable_custom_https( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps' + url = self.disable_custom_https.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -504,6 +508,7 @@ def disable_custom_https( return client_raw_response return deserialized + disable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} def enable_custom_https( self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): @@ -533,7 +538,7 @@ def enable_custom_https( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps' + url = self.enable_custom_https.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -574,3 +579,4 @@ def enable_custom_https( return client_raw_response return deserialized + enable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py index 1c9b5bdb5644..3d788cd2ce9f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py @@ -21,8 +21,8 @@ class EdgeNodesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -56,7 +56,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Cdn/edgenodes' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -95,3 +95,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Cdn/edgenodes'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py index 368eec2c1ae6..010d81e099cd 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py @@ -23,8 +23,8 @@ class EndpointsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -63,7 +63,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints' + url = self.list_by_profile.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -108,6 +108,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints'} def get( self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -135,7 +136,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -175,12 +176,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} def _create_initial( self, resource_group_name, profile_name, endpoint_name, endpoint, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -301,12 +303,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} def _update_initial( self, resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -429,12 +432,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} def _delete_initial( self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -532,12 +536,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}'} def _start_initial( self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start' + url = self.start.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -648,12 +653,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/start'} def _stop_initial( self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop' + url = self.stop.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -764,6 +770,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/stop'} def _purge_content_initial( @@ -771,7 +778,7 @@ def _purge_content_initial( content_file_paths = models.PurgeParameters(content_paths=content_paths) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge' + url = self.purge_content.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -876,6 +883,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + purge_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/purge'} def _load_content_initial( @@ -883,7 +891,7 @@ def _load_content_initial( content_file_paths = models.LoadParameters(content_paths=content_paths) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load' + url = self.load_content.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -988,6 +996,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + load_content.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/load'} def validate_custom_domain( self, resource_group_name, profile_name, endpoint_name, host_name, custom_headers=None, raw=False, **operation_config): @@ -1020,7 +1029,7 @@ def validate_custom_domain( custom_domain_properties = models.ValidateCustomDomainInput(host_name=host_name) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain' + url = self.validate_custom_domain.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -1064,6 +1073,7 @@ def validate_custom_domain( return client_raw_response return deserialized + validate_custom_domain.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/validateCustomDomain'} def list_resource_usage( self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): @@ -1094,7 +1104,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage' + url = self.list_resource_usage.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -1140,3 +1150,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_resource_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/checkResourceUsage'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py index ef5b4a0bd70a..07eb4c2795ff 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py @@ -21,8 +21,8 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.Cdn/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -94,3 +94,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.Cdn/operations'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py index cdb82f63dfd0..9942cd399b2d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py @@ -23,8 +23,8 @@ class OriginsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -66,7 +66,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins' + url = self.list_by_endpoint.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -112,6 +112,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins'} def get( self, resource_group_name, profile_name, endpoint_name, origin_name, custom_headers=None, raw=False, **operation_config): @@ -141,7 +142,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -182,12 +183,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} def _update_initial( self, resource_group_name, profile_name, endpoint_name, origin_name, origin_update_properties, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -311,3 +313,4 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index c095c4b3f431..56f1e7d50219 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -23,8 +23,8 @@ class ProfilesOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -57,7 +57,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -100,6 +100,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/profiles'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -123,7 +124,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -167,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.Cdn/profiles'} def get( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -191,7 +193,7 @@ def get( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}' + url = self.get.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -230,12 +232,13 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} def _create_initial( self, resource_group_name, profile_name, profile, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}' + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -351,6 +354,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} def _update_initial( @@ -358,7 +362,7 @@ def _update_initial( profile_update_parameters = models.ProfileUpdateParameters(tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}' + url = self.update.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -472,12 +476,13 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} def _delete_initial( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}' + url = self.delete.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -571,6 +576,7 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}'} def generate_sso_uri( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -599,7 +605,7 @@ def generate_sso_uri( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri' + url = self.generate_sso_uri.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -638,6 +644,7 @@ def generate_sso_uri( return client_raw_response return deserialized + generate_sso_uri.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri'} def list_supported_optimization_types( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -664,7 +671,7 @@ def list_supported_optimization_types( :class:`ErrorResponseException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes' + url = self.list_supported_optimization_types.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -703,6 +710,7 @@ def list_supported_optimization_types( return client_raw_response return deserialized + list_supported_optimization_types.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes'} def list_resource_usage( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): @@ -730,7 +738,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage' + url = self.list_resource_usage.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -775,3 +783,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_resource_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkResourceUsage'} diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py index 1d0c8caf26db..57aaa52c4506 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py @@ -21,8 +21,8 @@ class ResourceUsageOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-04-02". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-04-02" + self.api_version = "2017-10-12" self.config = config @@ -56,7 +56,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage' + url = self.list.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -99,3 +99,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage'}