diff --git a/sdk/cdn/azure-mgmt-cdn/README.rst b/sdk/cdn/azure-mgmt-cdn/README.rst index 860062d8cab..ef5eb136d1c 100644 --- a/sdk/cdn/azure-mgmt-cdn/README.rst +++ b/sdk/cdn/azure-mgmt-cdn/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure CDN Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py index cba63c568f3..333c5d6379a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py @@ -20,6 +20,7 @@ from .operations.profiles_operations import ProfilesOperations from .operations.endpoints_operations import EndpointsOperations from .operations.origins_operations import OriginsOperations +from .operations.origin_groups_operations import OriginGroupsOperations from .operations.custom_domains_operations import CustomDomainsOperations from .operations.resource_usage_operations import ResourceUsageOperations from .operations.operations import Operations @@ -60,7 +61,7 @@ def __init__( class CdnManagementClient(SDKClient): - """Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests made to these resources are secure. + """Cdn Management Client :ivar config: Configuration for client. :vartype config: CdnManagementClientConfiguration @@ -71,6 +72,8 @@ class CdnManagementClient(SDKClient): :vartype endpoints: azure.mgmt.cdn.operations.EndpointsOperations :ivar origins: Origins operations :vartype origins: azure.mgmt.cdn.operations.OriginsOperations + :ivar origin_groups: OriginGroups operations + :vartype origin_groups: azure.mgmt.cdn.operations.OriginGroupsOperations :ivar custom_domains: CustomDomains operations :vartype custom_domains: azure.mgmt.cdn.operations.CustomDomainsOperations :ivar resource_usage: ResourceUsage operations @@ -95,7 +98,7 @@ def __init__( super(CdnManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-10-12' + self.api_version = '2019-12-31' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -105,6 +108,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.origins = OriginsOperations( self._client, self.config, self._serialize, self._deserialize) + self.origin_groups = OriginGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) self.custom_domains = CustomDomainsOperations( self._client, self.config, self._serialize, self._deserialize) self.resource_usage = ResourceUsageOperations( diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 2e382b4c086..f63da3e1176 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -16,23 +16,63 @@ from .sso_uri_py3 import SsoUri from .supported_optimization_types_list_result_py3 import SupportedOptimizationTypesListResult from .deep_created_origin_py3 import DeepCreatedOrigin + from .health_probe_parameters_py3 import HealthProbeParameters + from .resource_reference_py3 import ResourceReference + from .http_error_range_parameters_py3 import HttpErrorRangeParameters + from .response_based_origin_error_detection_parameters_py3 import ResponseBasedOriginErrorDetectionParameters + from .deep_created_origin_group_py3 import DeepCreatedOriginGroup from .endpoint_py3 import Endpoint from .geo_filter_py3 import GeoFilter - from .delivery_rule_action_py3 import DeliveryRuleAction from .delivery_rule_condition_py3 import DeliveryRuleCondition + from .delivery_rule_action_py3 import DeliveryRuleAction from .delivery_rule_py3 import DeliveryRule from .endpoint_properties_update_parameters_delivery_policy_py3 import EndpointPropertiesUpdateParametersDeliveryPolicy from .endpoint_update_parameters_py3 import EndpointUpdateParameters - from .url_path_condition_parameters_py3 import UrlPathConditionParameters + from .remote_address_match_condition_parameters_py3 import RemoteAddressMatchConditionParameters + from .delivery_rule_remote_address_condition_py3 import DeliveryRuleRemoteAddressCondition + from .request_method_match_condition_parameters_py3 import RequestMethodMatchConditionParameters + from .delivery_rule_request_method_condition_py3 import DeliveryRuleRequestMethodCondition + from .query_string_match_condition_parameters_py3 import QueryStringMatchConditionParameters + from .delivery_rule_query_string_condition_py3 import DeliveryRuleQueryStringCondition + from .post_args_match_condition_parameters_py3 import PostArgsMatchConditionParameters + from .delivery_rule_post_args_condition_py3 import DeliveryRulePostArgsCondition + from .request_uri_match_condition_parameters_py3 import RequestUriMatchConditionParameters + from .delivery_rule_request_uri_condition_py3 import DeliveryRuleRequestUriCondition + from .request_header_match_condition_parameters_py3 import RequestHeaderMatchConditionParameters + from .delivery_rule_request_header_condition_py3 import DeliveryRuleRequestHeaderCondition + from .request_body_match_condition_parameters_py3 import RequestBodyMatchConditionParameters + from .delivery_rule_request_body_condition_py3 import DeliveryRuleRequestBodyCondition + from .request_scheme_match_condition_parameters_py3 import RequestSchemeMatchConditionParameters + from .delivery_rule_request_scheme_condition_py3 import DeliveryRuleRequestSchemeCondition + from .url_path_match_condition_parameters_py3 import UrlPathMatchConditionParameters from .delivery_rule_url_path_condition_py3 import DeliveryRuleUrlPathCondition - from .url_file_extension_condition_parameters_py3 import UrlFileExtensionConditionParameters + from .url_file_extension_match_condition_parameters_py3 import UrlFileExtensionMatchConditionParameters from .delivery_rule_url_file_extension_condition_py3 import DeliveryRuleUrlFileExtensionCondition + from .url_file_name_match_condition_parameters_py3 import UrlFileNameMatchConditionParameters + from .delivery_rule_url_file_name_condition_py3 import DeliveryRuleUrlFileNameCondition + from .http_version_match_condition_parameters_py3 import HttpVersionMatchConditionParameters + from .delivery_rule_http_version_condition_py3 import DeliveryRuleHttpVersionCondition + from .cookies_match_condition_parameters_py3 import CookiesMatchConditionParameters + from .delivery_rule_cookies_condition_py3 import DeliveryRuleCookiesCondition + from .is_device_match_condition_parameters_py3 import IsDeviceMatchConditionParameters + from .delivery_rule_is_device_condition_py3 import DeliveryRuleIsDeviceCondition + from .url_redirect_action_parameters_py3 import UrlRedirectActionParameters + from .url_redirect_action_py3 import UrlRedirectAction + from .url_rewrite_action_parameters_py3 import UrlRewriteActionParameters + from .url_rewrite_action_py3 import UrlRewriteAction + from .header_action_parameters_py3 import HeaderActionParameters + from .delivery_rule_request_header_action_py3 import DeliveryRuleRequestHeaderAction + from .delivery_rule_response_header_action_py3 import DeliveryRuleResponseHeaderAction from .cache_expiration_action_parameters_py3 import CacheExpirationActionParameters from .delivery_rule_cache_expiration_action_py3 import DeliveryRuleCacheExpirationAction + from .cache_key_query_string_action_parameters_py3 import CacheKeyQueryStringActionParameters + from .delivery_rule_cache_key_query_string_action_py3 import DeliveryRuleCacheKeyQueryStringAction from .purge_parameters_py3 import PurgeParameters from .load_parameters_py3 import LoadParameters from .origin_py3 import Origin from .origin_update_parameters_py3 import OriginUpdateParameters + from .origin_group_py3 import OriginGroup + from .origin_group_update_parameters_py3 import OriginGroupUpdateParameters from .custom_domain_py3 import CustomDomain from .custom_domain_parameters_py3 import CustomDomainParameters from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters @@ -63,23 +103,63 @@ from .sso_uri import SsoUri from .supported_optimization_types_list_result import SupportedOptimizationTypesListResult from .deep_created_origin import DeepCreatedOrigin + from .health_probe_parameters import HealthProbeParameters + from .resource_reference import ResourceReference + from .http_error_range_parameters import HttpErrorRangeParameters + from .response_based_origin_error_detection_parameters import ResponseBasedOriginErrorDetectionParameters + from .deep_created_origin_group import DeepCreatedOriginGroup from .endpoint import Endpoint from .geo_filter import GeoFilter - from .delivery_rule_action import DeliveryRuleAction from .delivery_rule_condition import DeliveryRuleCondition + from .delivery_rule_action import DeliveryRuleAction 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 .remote_address_match_condition_parameters import RemoteAddressMatchConditionParameters + from .delivery_rule_remote_address_condition import DeliveryRuleRemoteAddressCondition + from .request_method_match_condition_parameters import RequestMethodMatchConditionParameters + from .delivery_rule_request_method_condition import DeliveryRuleRequestMethodCondition + from .query_string_match_condition_parameters import QueryStringMatchConditionParameters + from .delivery_rule_query_string_condition import DeliveryRuleQueryStringCondition + from .post_args_match_condition_parameters import PostArgsMatchConditionParameters + from .delivery_rule_post_args_condition import DeliveryRulePostArgsCondition + from .request_uri_match_condition_parameters import RequestUriMatchConditionParameters + from .delivery_rule_request_uri_condition import DeliveryRuleRequestUriCondition + from .request_header_match_condition_parameters import RequestHeaderMatchConditionParameters + from .delivery_rule_request_header_condition import DeliveryRuleRequestHeaderCondition + from .request_body_match_condition_parameters import RequestBodyMatchConditionParameters + from .delivery_rule_request_body_condition import DeliveryRuleRequestBodyCondition + from .request_scheme_match_condition_parameters import RequestSchemeMatchConditionParameters + from .delivery_rule_request_scheme_condition import DeliveryRuleRequestSchemeCondition + from .url_path_match_condition_parameters import UrlPathMatchConditionParameters from .delivery_rule_url_path_condition import DeliveryRuleUrlPathCondition - from .url_file_extension_condition_parameters import UrlFileExtensionConditionParameters + from .url_file_extension_match_condition_parameters import UrlFileExtensionMatchConditionParameters from .delivery_rule_url_file_extension_condition import DeliveryRuleUrlFileExtensionCondition + from .url_file_name_match_condition_parameters import UrlFileNameMatchConditionParameters + from .delivery_rule_url_file_name_condition import DeliveryRuleUrlFileNameCondition + from .http_version_match_condition_parameters import HttpVersionMatchConditionParameters + from .delivery_rule_http_version_condition import DeliveryRuleHttpVersionCondition + from .cookies_match_condition_parameters import CookiesMatchConditionParameters + from .delivery_rule_cookies_condition import DeliveryRuleCookiesCondition + from .is_device_match_condition_parameters import IsDeviceMatchConditionParameters + from .delivery_rule_is_device_condition import DeliveryRuleIsDeviceCondition + from .url_redirect_action_parameters import UrlRedirectActionParameters + from .url_redirect_action import UrlRedirectAction + from .url_rewrite_action_parameters import UrlRewriteActionParameters + from .url_rewrite_action import UrlRewriteAction + from .header_action_parameters import HeaderActionParameters + from .delivery_rule_request_header_action import DeliveryRuleRequestHeaderAction + from .delivery_rule_response_header_action import DeliveryRuleResponseHeaderAction from .cache_expiration_action_parameters import CacheExpirationActionParameters from .delivery_rule_cache_expiration_action import DeliveryRuleCacheExpirationAction + from .cache_key_query_string_action_parameters import CacheKeyQueryStringActionParameters + from .delivery_rule_cache_key_query_string_action import DeliveryRuleCacheKeyQueryStringAction from .purge_parameters import PurgeParameters from .load_parameters import LoadParameters from .origin import Origin from .origin_update_parameters import OriginUpdateParameters + from .origin_group import OriginGroup + from .origin_group_update_parameters import OriginGroupUpdateParameters from .custom_domain import CustomDomain from .custom_domain_parameters import CustomDomainParameters from .custom_domain_https_parameters import CustomDomainHttpsParameters @@ -107,6 +187,7 @@ from .resource_usage_paged import ResourceUsagePaged from .endpoint_paged import EndpointPaged from .origin_paged import OriginPaged +from .origin_group_paged import OriginGroupPaged from .custom_domain_paged import CustomDomainPaged from .operation_paged import OperationPaged from .edge_node_paged import EdgeNodePaged @@ -114,14 +195,35 @@ SkuName, ProfileResourceState, OptimizationType, + HealthProbeRequestType, + ProbeProtocol, + ResponseBasedDetectedErrorTypes, EndpointResourceState, QueryStringCachingBehavior, GeoFilterActions, + RemoteAddressOperator, + Transform, + QueryStringOperator, + PostArgsOperator, + RequestUriOperator, + RequestHeaderOperator, + RequestBodyOperator, + UrlPathOperator, + UrlFileExtensionOperator, + UrlFileNameOperator, + CookiesOperator, + RedirectType, + DestinationProtocol, + HeaderAction, + CacheBehavior, + QueryStringBehavior, OriginResourceState, + OriginGroupResourceState, CustomDomainResourceState, CustomHttpsProvisioningState, CustomHttpsProvisioningSubstate, ProtocolType, + MinimumTlsVersion, CertificateType, ResourceType, ) @@ -133,23 +235,63 @@ 'SsoUri', 'SupportedOptimizationTypesListResult', 'DeepCreatedOrigin', + 'HealthProbeParameters', + 'ResourceReference', + 'HttpErrorRangeParameters', + 'ResponseBasedOriginErrorDetectionParameters', + 'DeepCreatedOriginGroup', 'Endpoint', 'GeoFilter', - 'DeliveryRuleAction', 'DeliveryRuleCondition', + 'DeliveryRuleAction', 'DeliveryRule', 'EndpointPropertiesUpdateParametersDeliveryPolicy', 'EndpointUpdateParameters', - 'UrlPathConditionParameters', + 'RemoteAddressMatchConditionParameters', + 'DeliveryRuleRemoteAddressCondition', + 'RequestMethodMatchConditionParameters', + 'DeliveryRuleRequestMethodCondition', + 'QueryStringMatchConditionParameters', + 'DeliveryRuleQueryStringCondition', + 'PostArgsMatchConditionParameters', + 'DeliveryRulePostArgsCondition', + 'RequestUriMatchConditionParameters', + 'DeliveryRuleRequestUriCondition', + 'RequestHeaderMatchConditionParameters', + 'DeliveryRuleRequestHeaderCondition', + 'RequestBodyMatchConditionParameters', + 'DeliveryRuleRequestBodyCondition', + 'RequestSchemeMatchConditionParameters', + 'DeliveryRuleRequestSchemeCondition', + 'UrlPathMatchConditionParameters', 'DeliveryRuleUrlPathCondition', - 'UrlFileExtensionConditionParameters', + 'UrlFileExtensionMatchConditionParameters', 'DeliveryRuleUrlFileExtensionCondition', + 'UrlFileNameMatchConditionParameters', + 'DeliveryRuleUrlFileNameCondition', + 'HttpVersionMatchConditionParameters', + 'DeliveryRuleHttpVersionCondition', + 'CookiesMatchConditionParameters', + 'DeliveryRuleCookiesCondition', + 'IsDeviceMatchConditionParameters', + 'DeliveryRuleIsDeviceCondition', + 'UrlRedirectActionParameters', + 'UrlRedirectAction', + 'UrlRewriteActionParameters', + 'UrlRewriteAction', + 'HeaderActionParameters', + 'DeliveryRuleRequestHeaderAction', + 'DeliveryRuleResponseHeaderAction', 'CacheExpirationActionParameters', 'DeliveryRuleCacheExpirationAction', + 'CacheKeyQueryStringActionParameters', + 'DeliveryRuleCacheKeyQueryStringAction', 'PurgeParameters', 'LoadParameters', 'Origin', 'OriginUpdateParameters', + 'OriginGroup', + 'OriginGroupUpdateParameters', 'CustomDomain', 'CustomDomainParameters', 'CustomDomainHttpsParameters', @@ -177,20 +319,42 @@ 'ResourceUsagePaged', 'EndpointPaged', 'OriginPaged', + 'OriginGroupPaged', 'CustomDomainPaged', 'OperationPaged', 'EdgeNodePaged', 'SkuName', 'ProfileResourceState', 'OptimizationType', + 'HealthProbeRequestType', + 'ProbeProtocol', + 'ResponseBasedDetectedErrorTypes', 'EndpointResourceState', 'QueryStringCachingBehavior', 'GeoFilterActions', + 'RemoteAddressOperator', + 'Transform', + 'QueryStringOperator', + 'PostArgsOperator', + 'RequestUriOperator', + 'RequestHeaderOperator', + 'RequestBodyOperator', + 'UrlPathOperator', + 'UrlFileExtensionOperator', + 'UrlFileNameOperator', + 'CookiesOperator', + 'RedirectType', + 'DestinationProtocol', + 'HeaderAction', + 'CacheBehavior', + 'QueryStringBehavior', 'OriginResourceState', + 'OriginGroupResourceState', 'CustomDomainResourceState', 'CustomHttpsProvisioningState', 'CustomHttpsProvisioningSubstate', 'ProtocolType', + 'MinimumTlsVersion', 'CertificateType', 'ResourceType', ] diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py index 43cd9fa3b5c..e1d2ac1f4ab 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -21,12 +21,12 @@ class CacheExpirationActionParameters(Model): All required parameters must be populated in order to send to Azure. :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + . :vartype odatatype: str - :param cache_behavior: Required. 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 + :param cache_behavior: Required. Caching behavior for the requests. + Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str @@ -48,7 +48,7 @@ class CacheExpirationActionParameters(Model): 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, } - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" cache_type = "All" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py index 1b178db8df9..52bb5de4510 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py @@ -21,12 +21,12 @@ class CacheExpirationActionParameters(Model): All required parameters must be populated in order to send to Azure. :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" . + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + . :vartype odatatype: str - :param cache_behavior: Required. 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 + :param cache_behavior: Required. Caching behavior for the requests. + Possible values include: 'BypassCache', 'Override', 'SetIfMissing' + :type cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str @@ -48,7 +48,7 @@ class CacheExpirationActionParameters(Model): 'cache_duration': {'key': 'cacheDuration', 'type': 'str'}, } - odatatype = "Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters" cache_type = "All" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters.py new file mode 100644 index 00000000000..752f0958355 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheKeyQueryStringActionParameters(Model): + """Defines the parameters for the cache-key query string action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + . + :vartype odatatype: str + :param query_string_behavior: Required. Caching behavior for the requests. + Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + :type query_string_behavior: str or + ~azure.mgmt.cdn.models.QueryStringBehavior + :param query_parameters: query parameters to include or exclude (comma + separated). + :type query_parameters: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'query_string_behavior': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'query_string_behavior': {'key': 'queryStringBehavior', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + + def __init__(self, **kwargs): + super(CacheKeyQueryStringActionParameters, self).__init__(**kwargs) + self.query_string_behavior = kwargs.get('query_string_behavior', None) + self.query_parameters = kwargs.get('query_parameters', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters_py3.py new file mode 100644 index 00000000000..9e617cb5965 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_key_query_string_action_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CacheKeyQueryStringActionParameters(Model): + """Defines the parameters for the cache-key query string action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + . + :vartype odatatype: str + :param query_string_behavior: Required. Caching behavior for the requests. + Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll' + :type query_string_behavior: str or + ~azure.mgmt.cdn.models.QueryStringBehavior + :param query_parameters: query parameters to include or exclude (comma + separated). + :type query_parameters: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'query_string_behavior': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'query_string_behavior': {'key': 'queryStringBehavior', 'type': 'str'}, + 'query_parameters': {'key': 'queryParameters', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters" + + def __init__(self, *, query_string_behavior, query_parameters: str=None, **kwargs) -> None: + super(CacheKeyQueryStringActionParameters, self).__init__(**kwargs) + self.query_string_behavior = query_string_behavior + self.query_parameters = query_parameters diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py index 3c9a2bcca29..0008581a92b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py @@ -22,6 +22,9 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,6 +41,7 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'}, } diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py index 909a93392f8..e0e711886f6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py @@ -22,6 +22,9 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,11 +41,12 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'}, } - def __init__(self, *, protocol_type, certificate_source_parameters, **kwargs) -> None: - super(CdnManagedHttpsParameters, self).__init__(protocol_type=protocol_type, **kwargs) + def __init__(self, *, protocol_type, certificate_source_parameters, minimum_tls_version=None, **kwargs) -> None: + super(CdnManagedHttpsParameters, self).__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs) self.certificate_source_parameters = certificate_source_parameters self.certificate_source = 'Cdn' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py index 0a15a6028ea..bbf2d47aeae 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py @@ -20,6 +20,7 @@ class SkuName(str, Enum): standard_akamai = "Standard_Akamai" standard_china_cdn = "Standard_ChinaCdn" standard_microsoft = "Standard_Microsoft" + premium_china_cdn = "Premium_ChinaCdn" class ProfileResourceState(str, Enum): @@ -39,6 +40,27 @@ class OptimizationType(str, Enum): dynamic_site_acceleration = "DynamicSiteAcceleration" +class HealthProbeRequestType(str, Enum): + + not_set = "NotSet" + get = "GET" + head = "HEAD" + + +class ProbeProtocol(str, Enum): + + not_set = "NotSet" + http = "Http" + https = "Https" + + +class ResponseBasedDetectedErrorTypes(str, Enum): + + none = "None" + tcp_errors_only = "TcpErrorsOnly" + tcp_and_http_errors = "TcpAndHttpErrors" + + class EndpointResourceState(str, Enum): creating = "Creating" @@ -63,6 +85,174 @@ class GeoFilterActions(str, Enum): allow = "Allow" +class RemoteAddressOperator(str, Enum): + + any = "Any" + ip_match = "IPMatch" + geo_match = "GeoMatch" + + +class Transform(str, Enum): + + lowercase = "Lowercase" + uppercase = "Uppercase" + + +class QueryStringOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class PostArgsOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RequestUriOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RequestHeaderOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RequestBodyOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class UrlPathOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + wildcard = "Wildcard" + + +class UrlFileExtensionOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class UrlFileNameOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class CookiesOperator(str, Enum): + + any = "Any" + equal = "Equal" + contains = "Contains" + begins_with = "BeginsWith" + ends_with = "EndsWith" + less_than = "LessThan" + less_than_or_equal = "LessThanOrEqual" + greater_than = "GreaterThan" + greater_than_or_equal = "GreaterThanOrEqual" + + +class RedirectType(str, Enum): + + moved = "Moved" + found = "Found" + temporary_redirect = "TemporaryRedirect" + permanent_redirect = "PermanentRedirect" + + +class DestinationProtocol(str, Enum): + + match_request = "MatchRequest" + http = "Http" + https = "Https" + + +class HeaderAction(str, Enum): + + append = "Append" + overwrite = "Overwrite" + delete = "Delete" + + +class CacheBehavior(str, Enum): + + bypass_cache = "BypassCache" + override = "Override" + set_if_missing = "SetIfMissing" + + +class QueryStringBehavior(str, Enum): + + include = "Include" + include_all = "IncludeAll" + exclude = "Exclude" + exclude_all = "ExcludeAll" + + class OriginResourceState(str, Enum): creating = "Creating" @@ -70,6 +260,13 @@ class OriginResourceState(str, Enum): deleting = "Deleting" +class OriginGroupResourceState(str, Enum): + + creating = "Creating" + active = "Active" + deleting = "Deleting" + + class CustomDomainResourceState(str, Enum): creating = "Creating" @@ -106,6 +303,13 @@ class ProtocolType(str, Enum): ip_based = "IPBased" +class MinimumTlsVersion(str, Enum): + + none = "None" + tls10 = "TLS10" + tls12 = "TLS12" + + class CertificateType(str, Enum): shared = "Shared" diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters.py new file mode 100644 index 00000000000..1241bfc2e46 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters.py @@ -0,0 +1,65 @@ +# 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 CookiesMatchConditionParameters(Model): + """Defines the parameters for Cookies match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of Cookies to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.CookiesOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" + + def __init__(self, **kwargs): + super(CookiesMatchConditionParameters, self).__init__(**kwargs) + self.selector = kwargs.get('selector', None) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters_py3.py new file mode 100644 index 00000000000..2a7d45be90b --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/cookies_match_condition_parameters_py3.py @@ -0,0 +1,65 @@ +# 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 CookiesMatchConditionParameters(Model): + """Defines the parameters for Cookies match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of Cookies to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.CookiesOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" + + def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(CookiesMatchConditionParameters, self).__init__(**kwargs) + self.selector = selector + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py index c854a87ff85..14fd42bab2b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py @@ -24,6 +24,9 @@ class CustomDomainHttpsParameters(Model): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str """ @@ -35,6 +38,7 @@ class CustomDomainHttpsParameters(Model): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, } @@ -45,4 +49,5 @@ class CustomDomainHttpsParameters(Model): def __init__(self, **kwargs): super(CustomDomainHttpsParameters, self).__init__(**kwargs) self.protocol_type = kwargs.get('protocol_type', None) + self.minimum_tls_version = kwargs.get('minimum_tls_version', None) self.certificate_source = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py index 97bfd1838cb..ca7c8530f1c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py @@ -24,6 +24,9 @@ class CustomDomainHttpsParameters(Model): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str """ @@ -35,6 +38,7 @@ class CustomDomainHttpsParameters(Model): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, } @@ -42,7 +46,8 @@ class CustomDomainHttpsParameters(Model): 'certificate_source': {'Cdn': 'CdnManagedHttpsParameters', 'AzureKeyVault': 'UserManagedHttpsParameters'} } - def __init__(self, *, protocol_type, **kwargs) -> None: + def __init__(self, *, protocol_type, minimum_tls_version=None, **kwargs) -> None: super(CustomDomainHttpsParameters, self).__init__(**kwargs) self.protocol_type = protocol_type + self.minimum_tls_version = minimum_tls_version self.certificate_source = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py index 16ff46a21a2..63e2410b138 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin.py @@ -17,16 +17,34 @@ class DeepCreatedOrigin(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Origin name + :param name: Required. Origin name which must be unique within the + endpoint. :type name: str :param host_name: Required. The address of the origin. It can be a domain - name, IPv4 address, or IPv6 address. + name, IPv4 address, or IPv6 address. This should be unique across all + origins in an endpoint. :type host_name: str - :param http_port: The value of the HTTP port. Must be between 1 and 65535 + :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int :param https_port: The value of the HTTPS port. Must be between 1 and - 65535 + 65535. :type https_port: int + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str + :param priority: Priority of origin in given origin group for load + balancing. Higher priorities will not be used for load balancing if any + lower priority origin is healthy.Must be between 1 and 5. + :type priority: int + :param weight: Weight of the origin in given origin group for load + balancing. Must be between 1 and 1000 + :type weight: int + :param enabled: Origin is enabled for load balancing or not. By default, + origin is always enabled. + :type enabled: bool """ _validation = { @@ -34,6 +52,8 @@ class DeepCreatedOrigin(Model): 'host_name': {'required': True}, 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, + 'priority': {'maximum': 5, 'minimum': 1}, + 'weight': {'maximum': 1000, 'minimum': 1}, } _attribute_map = { @@ -41,6 +61,10 @@ class DeepCreatedOrigin(Model): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'weight': {'key': 'properties.weight', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -49,3 +73,7 @@ def __init__(self, **kwargs): self.host_name = kwargs.get('host_name', None) self.http_port = kwargs.get('http_port', None) self.https_port = kwargs.get('https_port', None) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.priority = kwargs.get('priority', None) + self.weight = kwargs.get('weight', None) + self.enabled = kwargs.get('enabled', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_group.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_group.py new file mode 100644 index 00000000000..347c76a78b8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_group.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeepCreatedOriginGroup(Model): + """The origin group for CDN content which is added when creating a CDN + endpoint. Traffic is sent to the origins within the origin group based on + origin health. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Origin group name which must be unique within the + endpoint. + :type name: str + :param health_probe_settings: Health probe settings to the origin that is + used to determine the health of the origin. + :type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :param origins: Required. The source of the content being delivered via + CDN within given origin group. + :type origins: list[~azure.mgmt.cdn.models.ResourceReference] + :param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: + Time in minutes to shift the traffic to the endpoint gradually when an + unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 + mins. This property is currently not supported. + :type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :param response_based_origin_error_detection_settings: The JSON object + that contains the properties to determine origin health using real + requests/responses.This property is currently not supported. + :type response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + """ + + _validation = { + 'name': {'required': True}, + 'origins': {'required': True}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'}, + 'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'}, + 'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'}, + } + + def __init__(self, **kwargs): + super(DeepCreatedOriginGroup, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.health_probe_settings = kwargs.get('health_probe_settings', None) + self.origins = kwargs.get('origins', None) + self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = kwargs.get('traffic_restoration_time_to_healed_or_new_endpoints_in_minutes', None) + self.response_based_origin_error_detection_settings = kwargs.get('response_based_origin_error_detection_settings', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_group_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_group_py3.py new file mode 100644 index 00000000000..7a5d1ee79a6 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_group_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DeepCreatedOriginGroup(Model): + """The origin group for CDN content which is added when creating a CDN + endpoint. Traffic is sent to the origins within the origin group based on + origin health. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Origin group name which must be unique within the + endpoint. + :type name: str + :param health_probe_settings: Health probe settings to the origin that is + used to determine the health of the origin. + :type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :param origins: Required. The source of the content being delivered via + CDN within given origin group. + :type origins: list[~azure.mgmt.cdn.models.ResourceReference] + :param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: + Time in minutes to shift the traffic to the endpoint gradually when an + unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 + mins. This property is currently not supported. + :type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :param response_based_origin_error_detection_settings: The JSON object + that contains the properties to determine origin health using real + requests/responses.This property is currently not supported. + :type response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + """ + + _validation = { + 'name': {'required': True}, + 'origins': {'required': True}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'}, + 'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'}, + 'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'}, + } + + def __init__(self, *, name: str, origins, health_probe_settings=None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int=None, response_based_origin_error_detection_settings=None, **kwargs) -> None: + super(DeepCreatedOriginGroup, self).__init__(**kwargs) + self.name = name + self.health_probe_settings = health_probe_settings + self.origins = origins + self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = traffic_restoration_time_to_healed_or_new_endpoints_in_minutes + self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py index 1de34bb5580..68c6395f4f1 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/deep_created_origin_py3.py @@ -17,16 +17,34 @@ class DeepCreatedOrigin(Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Origin name + :param name: Required. Origin name which must be unique within the + endpoint. :type name: str :param host_name: Required. The address of the origin. It can be a domain - name, IPv4 address, or IPv6 address. + name, IPv4 address, or IPv6 address. This should be unique across all + origins in an endpoint. :type host_name: str - :param http_port: The value of the HTTP port. Must be between 1 and 65535 + :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int :param https_port: The value of the HTTPS port. Must be between 1 and - 65535 + 65535. :type https_port: int + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str + :param priority: Priority of origin in given origin group for load + balancing. Higher priorities will not be used for load balancing if any + lower priority origin is healthy.Must be between 1 and 5. + :type priority: int + :param weight: Weight of the origin in given origin group for load + balancing. Must be between 1 and 1000 + :type weight: int + :param enabled: Origin is enabled for load balancing or not. By default, + origin is always enabled. + :type enabled: bool """ _validation = { @@ -34,6 +52,8 @@ class DeepCreatedOrigin(Model): 'host_name': {'required': True}, 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, + 'priority': {'maximum': 5, 'minimum': 1}, + 'weight': {'maximum': 1000, 'minimum': 1}, } _attribute_map = { @@ -41,11 +61,19 @@ class DeepCreatedOrigin(Model): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'weight': {'key': 'properties.weight', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, *, name: str, host_name: str, http_port: int=None, https_port: int=None, **kwargs) -> None: + def __init__(self, *, name: str, host_name: str, http_port: int=None, https_port: int=None, origin_host_header: str=None, priority: int=None, weight: int=None, enabled: bool=None, **kwargs) -> None: super(DeepCreatedOrigin, self).__init__(**kwargs) self.name = name self.host_name = host_name self.http_port = http_port self.https_port = https_port + self.origin_host_header = origin_host_header + self.priority = priority + self.weight = weight + self.enabled = enabled diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py index 63f57602843..52fe9f00905 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule.py @@ -17,18 +17,20 @@ class DeliveryRule(Model): All required parameters must be populated in order to send to Azure. + :param name: Name of the rule + :type name: str :param order: Required. 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: Required. 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] + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] """ _validation = { @@ -37,13 +39,15 @@ class DeliveryRule(Model): } _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, 'order': {'key': 'order', 'type': 'int'}, - 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, } def __init__(self, **kwargs): super(DeliveryRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) self.order = kwargs.get('order', None) - self.actions = kwargs.get('actions', None) self.conditions = kwargs.get('conditions', None) + self.actions = kwargs.get('actions', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py index c3bd94a0ea7..ad9d1b8ca89 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action.py @@ -16,7 +16,9 @@ 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 + sub-classes are: UrlRedirectAction, UrlRewriteAction, + DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, + DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction All required parameters must be populated in order to send to Azure. @@ -33,7 +35,7 @@ class DeliveryRuleAction(Model): } _subtype_map = { - 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + 'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'} } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py index 10d60ce7ce3..619da8a0bfe 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_action_py3.py @@ -16,7 +16,9 @@ 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 + sub-classes are: UrlRedirectAction, UrlRewriteAction, + DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction, + DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction All required parameters must be populated in order to send to Azure. @@ -33,7 +35,7 @@ class DeliveryRuleAction(Model): } _subtype_map = { - 'name': {'CacheExpiration': 'DeliveryRuleCacheExpirationAction'} + 'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'} } def __init__(self, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action.py new file mode 100644 index 00000000000..f3b4084480f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action.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 .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction): + """Defines the cache-key query string action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: + ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheKeyQueryStringActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleCacheKeyQueryStringAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'CacheKeyQueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action_py3.py new file mode 100644 index 00000000000..751ee6a12b7 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cache_key_query_string_action_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction): + """Defines the cache-key query string action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: + ~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CacheKeyQueryStringActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleCacheKeyQueryStringAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'CacheKeyQueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py index ad81c9f7b53..c56928a27d1 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition.py @@ -16,8 +16,14 @@ 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 + sub-classes are: DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestMethodCondition, DeliveryRuleQueryStringCondition, + DeliveryRulePostArgsCondition, DeliveryRuleRequestUriCondition, + DeliveryRuleRequestHeaderCondition, DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestSchemeCondition, DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, + DeliveryRuleHttpVersionCondition, DeliveryRuleCookiesCondition, + DeliveryRuleIsDeviceCondition All required parameters must be populated in order to send to Azure. @@ -34,7 +40,7 @@ class DeliveryRuleCondition(Model): } _subtype_map = { - 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + 'name': {'RemoteAddress': 'DeliveryRuleRemoteAddressCondition', 'RequestMethod': 'DeliveryRuleRequestMethodCondition', 'QueryString': 'DeliveryRuleQueryStringCondition', 'PostArgs': 'DeliveryRulePostArgsCondition', 'RequestUri': 'DeliveryRuleRequestUriCondition', 'RequestHeader': 'DeliveryRuleRequestHeaderCondition', 'RequestBody': 'DeliveryRuleRequestBodyCondition', 'RequestScheme': 'DeliveryRuleRequestSchemeCondition', 'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition', 'UrlFileName': 'DeliveryRuleUrlFileNameCondition', 'HttpVersion': 'DeliveryRuleHttpVersionCondition', 'Cookies': 'DeliveryRuleCookiesCondition', 'IsDevice': 'DeliveryRuleIsDeviceCondition'} } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py index e50925b7db4..10f476c36c4 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_condition_py3.py @@ -16,8 +16,14 @@ 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 + sub-classes are: DeliveryRuleRemoteAddressCondition, + DeliveryRuleRequestMethodCondition, DeliveryRuleQueryStringCondition, + DeliveryRulePostArgsCondition, DeliveryRuleRequestUriCondition, + DeliveryRuleRequestHeaderCondition, DeliveryRuleRequestBodyCondition, + DeliveryRuleRequestSchemeCondition, DeliveryRuleUrlPathCondition, + DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition, + DeliveryRuleHttpVersionCondition, DeliveryRuleCookiesCondition, + DeliveryRuleIsDeviceCondition All required parameters must be populated in order to send to Azure. @@ -34,7 +40,7 @@ class DeliveryRuleCondition(Model): } _subtype_map = { - 'name': {'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition'} + 'name': {'RemoteAddress': 'DeliveryRuleRemoteAddressCondition', 'RequestMethod': 'DeliveryRuleRequestMethodCondition', 'QueryString': 'DeliveryRuleQueryStringCondition', 'PostArgs': 'DeliveryRulePostArgsCondition', 'RequestUri': 'DeliveryRuleRequestUriCondition', 'RequestHeader': 'DeliveryRuleRequestHeaderCondition', 'RequestBody': 'DeliveryRuleRequestBodyCondition', 'RequestScheme': 'DeliveryRuleRequestSchemeCondition', 'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition', 'UrlFileName': 'DeliveryRuleUrlFileNameCondition', 'HttpVersion': 'DeliveryRuleHttpVersionCondition', 'Cookies': 'DeliveryRuleCookiesCondition', 'IsDevice': 'DeliveryRuleIsDeviceCondition'} } def __init__(self, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition.py new file mode 100644 index 00000000000..bf238f4612f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition.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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleCookiesCondition(DeliveryRuleCondition): + """Defines the Cookies condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CookiesMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleCookiesCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'Cookies' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition_py3.py new file mode 100644 index 00000000000..1363dc50867 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_cookies_condition_py3.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 .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleCookiesCondition(DeliveryRuleCondition): + """Defines the Cookies condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'CookiesMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleCookiesCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'Cookies' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition.py new file mode 100644 index 00000000000..2e0bf73467c --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition): + """Defines the HttpVersion condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HttpVersionMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleHttpVersionCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'HttpVersion' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition_py3.py new file mode 100644 index 00000000000..302e8f316b2 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_http_version_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition): + """Defines the HttpVersion condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HttpVersionMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleHttpVersionCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'HttpVersion' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition.py new file mode 100644 index 00000000000..d1c0fb170aa --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition.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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition): + """Defines the IsDevice condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'IsDeviceMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleIsDeviceCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'IsDevice' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition_py3.py new file mode 100644 index 00000000000..6a8c08f3099 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_is_device_condition_py3.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 .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition): + """Defines the IsDevice condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'IsDeviceMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleIsDeviceCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'IsDevice' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition.py new file mode 100644 index 00000000000..d568da036b5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition.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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRulePostArgsCondition(DeliveryRuleCondition): + """Defines the PostArgs condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'PostArgsMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRulePostArgsCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'PostArgs' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition_py3.py new file mode 100644 index 00000000000..3818a6a97da --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_post_args_condition_py3.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 .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRulePostArgsCondition(DeliveryRuleCondition): + """Defines the PostArgs condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'PostArgsMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRulePostArgsCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'PostArgs' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py index b6f1c33b003..04a68bf60e0 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_py3.py @@ -17,18 +17,20 @@ class DeliveryRule(Model): All required parameters must be populated in order to send to Azure. + :param name: Name of the rule + :type name: str :param order: Required. 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: Required. 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] + :param actions: Required. A list of actions that are executed when all the + conditions of a rule are satisfied. + :type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction] """ _validation = { @@ -37,13 +39,15 @@ class DeliveryRule(Model): } _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, 'order': {'key': 'order', 'type': 'int'}, - 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, 'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'}, + 'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'}, } - def __init__(self, *, order: int, actions, conditions=None, **kwargs) -> None: + def __init__(self, *, order: int, actions, name: str=None, conditions=None, **kwargs) -> None: super(DeliveryRule, self).__init__(**kwargs) + self.name = name self.order = order - self.actions = actions self.conditions = conditions + self.actions = actions diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition.py new file mode 100644 index 00000000000..f4111307123 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleQueryStringCondition(DeliveryRuleCondition): + """Defines the QueryString condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'QueryStringMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleQueryStringCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'QueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition_py3.py new file mode 100644 index 00000000000..676429677af --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_query_string_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleQueryStringCondition(DeliveryRuleCondition): + """Defines the QueryString condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.QueryStringMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'QueryStringMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleQueryStringCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'QueryString' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition.py new file mode 100644 index 00000000000..1516e6c1a65 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition): + """Defines the RemoteAddress condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RemoteAddressMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRemoteAddressCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RemoteAddress' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition_py3.py new file mode 100644 index 00000000000..f16ee6c7d74 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_remote_address_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition): + """Defines the RemoteAddress condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RemoteAddressMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRemoteAddressCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RemoteAddress' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition.py new file mode 100644 index 00000000000..dcd2a953dac --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition): + """Defines the RequestBody condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestBodyMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestBodyCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestBody' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition_py3.py new file mode 100644 index 00000000000..2be0ee11dbc --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_body_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition): + """Defines the RequestBody condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestBodyMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestBodyCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestBody' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action.py new file mode 100644 index 00000000000..220ebe3ed1d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_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 .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleRequestHeaderAction(DeliveryRuleAction): + """Defines the request header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestHeaderAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'ModifyRequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action_py3.py new file mode 100644 index 00000000000..ba59c15384f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_action_py3.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 .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleRequestHeaderAction(DeliveryRuleAction): + """Defines the request header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestHeaderAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'ModifyRequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition.py new file mode 100644 index 00000000000..1d7a842ccff --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestHeaderCondition(DeliveryRuleCondition): + """Defines the RequestHeader condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestHeaderMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestHeaderCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition_py3.py new file mode 100644 index 00000000000..02b41481cb4 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_header_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestHeaderCondition(DeliveryRuleCondition): + """Defines the RequestHeader condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestHeaderMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestHeaderMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestHeaderCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition.py new file mode 100644 index 00000000000..dac7d2e667e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition): + """Defines the RequestMethod condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestMethodMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestMethodCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestMethod' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition_py3.py new file mode 100644 index 00000000000..3278d21c370 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_method_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition): + """Defines the RequestMethod condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestMethodMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestMethodCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestMethod' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition.py new file mode 100644 index 00000000000..1b7bfb47033 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition): + """Defines the RequestScheme condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestSchemeMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestSchemeCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestScheme' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition_py3.py new file mode 100644 index 00000000000..c669b502c72 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_scheme_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition): + """Defines the RequestScheme condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestSchemeMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestSchemeCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestScheme' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition.py new file mode 100644 index 00000000000..ab29e129dbf --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleRequestUriCondition(DeliveryRuleCondition): + """Defines the RequestUri condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestUriMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleRequestUriCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'RequestUri' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition_py3.py new file mode 100644 index 00000000000..6bd2728ea11 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_request_uri_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleRequestUriCondition(DeliveryRuleCondition): + """Defines the RequestUri condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.RequestUriMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'RequestUriMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleRequestUriCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'RequestUri' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action.py new file mode 100644 index 00000000000..6e82420e8cf --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_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 .delivery_rule_action import DeliveryRuleAction + + +class DeliveryRuleResponseHeaderAction(DeliveryRuleAction): + """Defines the response header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleResponseHeaderAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'ModifyResponseHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action_py3.py new file mode 100644 index 00000000000..700b8d51a9f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_response_header_action_py3.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 .delivery_rule_action_py3 import DeliveryRuleAction + + +class DeliveryRuleResponseHeaderAction(DeliveryRuleAction): + """Defines the response header action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.HeaderActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'HeaderActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleResponseHeaderAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'ModifyResponseHeader' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py index d215d3cd4b2..ccd83ada25d 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition.py @@ -13,7 +13,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): - """Defines the URL file extension condition for the delivery rule. + """Defines the UrlFileExtension condition for the delivery rule. All required parameters must be populated in order to send to Azure. @@ -21,7 +21,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): :type name: str :param parameters: Required. Defines the parameters for the condition. :type parameters: - ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters """ _validation = { @@ -31,7 +31,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionMatchConditionParameters'}, } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py index f97f2cac2d0..4af91ab748f 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_extension_condition_py3.py @@ -13,7 +13,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): - """Defines the URL file extension condition for the delivery rule. + """Defines the UrlFileExtension condition for the delivery rule. All required parameters must be populated in order to send to Azure. @@ -21,7 +21,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): :type name: str :param parameters: Required. Defines the parameters for the condition. :type parameters: - ~azure.mgmt.cdn.models.UrlFileExtensionConditionParameters + ~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters """ _validation = { @@ -31,7 +31,7 @@ class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionMatchConditionParameters'}, } def __init__(self, *, parameters, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition.py new file mode 100644 index 00000000000..2c6725e36f0 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_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 .delivery_rule_condition import DeliveryRuleCondition + + +class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition): + """Defines the UrlFileName condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileNameMatchConditionParameters'}, + } + + def __init__(self, **kwargs): + super(DeliveryRuleUrlFileNameCondition, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlFileName' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition_py3.py new file mode 100644 index 00000000000..3a3eecb759a --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_file_name_condition_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .delivery_rule_condition_py3 import DeliveryRuleCondition + + +class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition): + """Defines the UrlFileName condition for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the condition. + :type parameters: + ~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlFileNameMatchConditionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(DeliveryRuleUrlFileNameCondition, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlFileName' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py index b3eb2578b72..dc1721aac17 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition.py @@ -13,14 +13,14 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): - """Defines the URL path condition for the delivery rule. + """Defines the UrlPath condition for the delivery rule. All required parameters must be populated in order to send to Azure. :param name: Required. Constant filled by server. :type name: str :param parameters: Required. Defines the parameters for the condition. - :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + :type parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters """ _validation = { @@ -30,7 +30,7 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathMatchConditionParameters'}, } def __init__(self, **kwargs): diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py index 730fdcaec98..ab667939e5a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/delivery_rule_url_path_condition_py3.py @@ -13,14 +13,14 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): - """Defines the URL path condition for the delivery rule. + """Defines the UrlPath condition for the delivery rule. All required parameters must be populated in order to send to Azure. :param name: Required. Constant filled by server. :type name: str :param parameters: Required. Defines the parameters for the condition. - :type parameters: ~azure.mgmt.cdn.models.UrlPathConditionParameters + :type parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters """ _validation = { @@ -30,7 +30,7 @@ class DeliveryRuleUrlPathCondition(DeliveryRuleCondition): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'UrlPathConditionParameters'}, + 'parameters': {'key': 'parameters', 'type': 'UrlPathMatchConditionParameters'}, } def __init__(self, *, parameters, **kwargs) -> None: diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py index 3c4db7a3272..be6fa72ad6c 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py @@ -33,18 +33,20 @@ class Endpoint(TrackedResource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param origin_host_header: The host header value sent to the origin with - each request. If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud - Services require this host header value to match the origin hostname by - default. - :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. :type content_types_to_compress: list[str] + :param origin_host_header: The host header value sent to the origin with + each request. This property at Endpoint is only allowed when endpoint uses + single origin and can be overridden by the same property specified at + origin.If you leave this blank, the request hostname determines this + value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str :param is_compression_enabled: Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. @@ -75,12 +77,15 @@ class Endpoint(TrackedResource): :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType :param probe_path: Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal - routes for the CDN. This is relative to the origin path. + routes for the CDN. This is relative to the origin path. This property is + only relevant when using a single origin. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param default_origin_group: A reference to the origin group. + :type default_origin_group: ~azure.mgmt.cdn.models.ResourceReference :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. :type delivery_policy: @@ -91,6 +96,9 @@ class Endpoint(TrackedResource): :param origins: Required. The source of the content being delivered via CDN. :type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] + :param origin_groups: The origin groups comprising of origins that are + used for load balancing the traffic based on availability. + :type origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] :ivar resource_state: Resource status of the endpoint. Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' @@ -117,9 +125,9 @@ class Endpoint(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, @@ -127,18 +135,20 @@ class Endpoint(TrackedResource): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'default_origin_group': {'key': 'properties.defaultOriginGroup', 'type': 'ResourceReference'}, 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, + 'origin_groups': {'key': 'properties.originGroups', 'type': '[DeepCreatedOriginGroup]'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(Endpoint, self).__init__(**kwargs) - self.origin_host_header = kwargs.get('origin_host_header', None) self.origin_path = kwargs.get('origin_path', None) self.content_types_to_compress = kwargs.get('content_types_to_compress', None) + self.origin_host_header = kwargs.get('origin_host_header', None) self.is_compression_enabled = kwargs.get('is_compression_enabled', None) self.is_http_allowed = kwargs.get('is_http_allowed', None) self.is_https_allowed = kwargs.get('is_https_allowed', None) @@ -146,8 +156,10 @@ def __init__(self, **kwargs): self.optimization_type = kwargs.get('optimization_type', None) self.probe_path = kwargs.get('probe_path', None) self.geo_filters = kwargs.get('geo_filters', None) + self.default_origin_group = kwargs.get('default_origin_group', None) self.delivery_policy = kwargs.get('delivery_policy', None) self.host_name = None self.origins = kwargs.get('origins', None) + self.origin_groups = kwargs.get('origin_groups', None) self.resource_state = None self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py index 9c6a32cc6bd..bbd0bf3c17f 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py @@ -33,18 +33,20 @@ class Endpoint(TrackedResource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param origin_host_header: The host header value sent to the origin with - each request. If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud - Services require this host header value to match the origin hostname by - default. - :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. :type content_types_to_compress: list[str] + :param origin_host_header: The host header value sent to the origin with + each request. This property at Endpoint is only allowed when endpoint uses + single origin and can be overridden by the same property specified at + origin.If you leave this blank, the request hostname determines this + value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str :param is_compression_enabled: Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. @@ -75,12 +77,15 @@ class Endpoint(TrackedResource): :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType :param probe_path: Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal - routes for the CDN. This is relative to the origin path. + routes for the CDN. This is relative to the origin path. This property is + only relevant when using a single origin. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param default_origin_group: A reference to the origin group. + :type default_origin_group: ~azure.mgmt.cdn.models.ResourceReference :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. :type delivery_policy: @@ -91,6 +96,9 @@ class Endpoint(TrackedResource): :param origins: Required. The source of the content being delivered via CDN. :type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin] + :param origin_groups: The origin groups comprising of origins that are + used for load balancing the traffic based on availability. + :type origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup] :ivar resource_state: Resource status of the endpoint. Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' @@ -117,9 +125,9 @@ class Endpoint(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, @@ -127,18 +135,20 @@ class Endpoint(TrackedResource): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'default_origin_group': {'key': 'properties.defaultOriginGroup', 'type': 'ResourceReference'}, 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'}, + 'origin_groups': {'key': 'properties.originGroups', 'type': '[DeepCreatedOriginGroup]'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str, origins, tags=None, origin_host_header: str=None, origin_path: str=None, content_types_to_compress=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, delivery_policy=None, **kwargs) -> None: + def __init__(self, *, location: str, origins, tags=None, origin_path: str=None, content_types_to_compress=None, origin_host_header: str=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, default_origin_group=None, delivery_policy=None, origin_groups=None, **kwargs) -> None: super(Endpoint, self).__init__(location=location, tags=tags, **kwargs) - self.origin_host_header = origin_host_header self.origin_path = origin_path self.content_types_to_compress = content_types_to_compress + self.origin_host_header = origin_host_header self.is_compression_enabled = is_compression_enabled self.is_http_allowed = is_http_allowed self.is_https_allowed = is_https_allowed @@ -146,8 +156,10 @@ def __init__(self, *, location: str, origins, tags=None, origin_host_header: str self.optimization_type = optimization_type self.probe_path = probe_path self.geo_filters = geo_filters + self.default_origin_group = default_origin_group self.delivery_policy = delivery_policy self.host_name = None self.origins = origins + self.origin_groups = origin_groups self.resource_state = None self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py index 0a1ed8c7706..0bcef4d0b8e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py @@ -17,18 +17,20 @@ class EndpointUpdateParameters(Model): :param tags: Endpoint tags. :type tags: dict[str, str] - :param origin_host_header: The host header value sent to the origin with - each request. If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud - Services require this host header value to match the origin hostname by - default. - :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. :type content_types_to_compress: list[str] + :param origin_host_header: The host header value sent to the origin with + each request. This property at Endpoint is only allowed when endpoint uses + single origin and can be overridden by the same property specified at + origin.If you leave this blank, the request hostname determines this + value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str :param is_compression_enabled: Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. @@ -59,12 +61,15 @@ class EndpointUpdateParameters(Model): :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType :param probe_path: Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal - routes for the CDN. This is relative to the origin path. + routes for the CDN. This is relative to the origin path. This property is + only relevant when using a single origin. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param default_origin_group: A reference to the origin group. + :type default_origin_group: ~azure.mgmt.cdn.models.ResourceReference :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. :type delivery_policy: @@ -73,9 +78,9 @@ class EndpointUpdateParameters(Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, @@ -83,15 +88,16 @@ class EndpointUpdateParameters(Model): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'default_origin_group': {'key': 'properties.defaultOriginGroup', 'type': 'ResourceReference'}, 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, } def __init__(self, **kwargs): super(EndpointUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) - self.origin_host_header = kwargs.get('origin_host_header', None) self.origin_path = kwargs.get('origin_path', None) self.content_types_to_compress = kwargs.get('content_types_to_compress', None) + self.origin_host_header = kwargs.get('origin_host_header', None) self.is_compression_enabled = kwargs.get('is_compression_enabled', None) self.is_http_allowed = kwargs.get('is_http_allowed', None) self.is_https_allowed = kwargs.get('is_https_allowed', None) @@ -99,4 +105,5 @@ def __init__(self, **kwargs): self.optimization_type = kwargs.get('optimization_type', None) self.probe_path = kwargs.get('probe_path', None) self.geo_filters = kwargs.get('geo_filters', None) + self.default_origin_group = kwargs.get('default_origin_group', None) self.delivery_policy = kwargs.get('delivery_policy', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py index e18452cae71..4d90774adfb 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py @@ -17,18 +17,20 @@ class EndpointUpdateParameters(Model): :param tags: Endpoint tags. :type tags: dict[str, str] - :param origin_host_header: The host header value sent to the origin with - each request. If you leave this blank, the request hostname determines - this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud - Services require this host header value to match the origin hostname by - default. - :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. :type origin_path: str :param content_types_to_compress: List of content types on which compression applies. The value should be a valid MIME type. :type content_types_to_compress: list[str] + :param origin_host_header: The host header value sent to the origin with + each request. This property at Endpoint is only allowed when endpoint uses + single origin and can be overridden by the same property specified at + origin.If you leave this blank, the request hostname determines this + value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. + :type origin_host_header: str :param is_compression_enabled: Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. @@ -59,12 +61,15 @@ class EndpointUpdateParameters(Model): :type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType :param probe_path: Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal - routes for the CDN. This is relative to the origin path. + routes for the CDN. This is relative to the origin path. This property is + only relevant when using a single origin. :type probe_path: str :param geo_filters: List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ :type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter] + :param default_origin_group: A reference to the origin group. + :type default_origin_group: ~azure.mgmt.cdn.models.ResourceReference :param delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. :type delivery_policy: @@ -73,9 +78,9 @@ class EndpointUpdateParameters(Model): _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'origin_path': {'key': 'properties.originPath', 'type': 'str'}, 'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, 'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'}, 'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'}, 'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'}, @@ -83,15 +88,16 @@ class EndpointUpdateParameters(Model): 'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'}, 'probe_path': {'key': 'properties.probePath', 'type': 'str'}, 'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'}, + 'default_origin_group': {'key': 'properties.defaultOriginGroup', 'type': 'ResourceReference'}, 'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'}, } - def __init__(self, *, tags=None, origin_host_header: str=None, origin_path: str=None, content_types_to_compress=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, delivery_policy=None, **kwargs) -> None: + def __init__(self, *, tags=None, origin_path: str=None, content_types_to_compress=None, origin_host_header: str=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, default_origin_group=None, delivery_policy=None, **kwargs) -> None: super(EndpointUpdateParameters, self).__init__(**kwargs) self.tags = tags - self.origin_host_header = origin_host_header self.origin_path = origin_path self.content_types_to_compress = content_types_to_compress + self.origin_host_header = origin_host_header self.is_compression_enabled = is_compression_enabled self.is_http_allowed = is_http_allowed self.is_https_allowed = is_https_allowed @@ -99,4 +105,5 @@ def __init__(self, *, tags=None, origin_host_header: str=None, origin_path: str= self.optimization_type = optimization_type self.probe_path = probe_path self.geo_filters = geo_filters + self.default_origin_group = default_origin_group self.delivery_policy = delivery_policy diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters.py new file mode 100644 index 00000000000..f82cc2e9514 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HeaderActionParameters(Model): + """Defines the parameters for the request header action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" . + :vartype odatatype: str + :param header_action: Required. Action to perform. Possible values + include: 'Append', 'Overwrite', 'Delete' + :type header_action: str or ~azure.mgmt.cdn.models.HeaderAction + :param header_name: Required. Name of the header to modify + :type header_name: str + :param value: Value for the specified action + :type value: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'header_action': {'required': True}, + 'header_name': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'header_action': {'key': 'headerAction', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + + def __init__(self, **kwargs): + super(HeaderActionParameters, self).__init__(**kwargs) + self.header_action = kwargs.get('header_action', None) + self.header_name = kwargs.get('header_name', None) + self.value = kwargs.get('value', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters_py3.py new file mode 100644 index 00000000000..368c596644d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/header_action_parameters_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HeaderActionParameters(Model): + """Defines the parameters for the request header action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" . + :vartype odatatype: str + :param header_action: Required. Action to perform. Possible values + include: 'Append', 'Overwrite', 'Delete' + :type header_action: str or ~azure.mgmt.cdn.models.HeaderAction + :param header_name: Required. Name of the header to modify + :type header_name: str + :param value: Value for the specified action + :type value: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'header_action': {'required': True}, + 'header_name': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'header_action': {'key': 'headerAction', 'type': 'str'}, + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters" + + def __init__(self, *, header_action, header_name: str, value: str=None, **kwargs) -> None: + super(HeaderActionParameters, self).__init__(**kwargs) + self.header_action = header_action + self.header_name = header_name + self.value = value diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/health_probe_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/health_probe_parameters.py new file mode 100644 index 00000000000..37c59f60044 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/health_probe_parameters.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthProbeParameters(Model): + """The JSON object that contains the properties to send health probes to + origin. + + :param probe_path: The path relative to the origin that is used to + determine the health of the origin. + :type probe_path: str + :param probe_request_type: The type of health probe request that is made. + Possible values include: 'NotSet', 'GET', 'HEAD' + :type probe_request_type: str or + ~azure.mgmt.cdn.models.HealthProbeRequestType + :param probe_protocol: Protocol to use for health probe. Possible values + include: 'NotSet', 'Http', 'Https' + :type probe_protocol: str or ~azure.mgmt.cdn.models.ProbeProtocol + :param probe_interval_in_seconds: The number of seconds between health + probes.Default is 240sec. + :type probe_interval_in_seconds: int + """ + + _validation = { + 'probe_interval_in_seconds': {'maximum': 255, 'minimum': 1}, + } + + _attribute_map = { + 'probe_path': {'key': 'probePath', 'type': 'str'}, + 'probe_request_type': {'key': 'probeRequestType', 'type': 'HealthProbeRequestType'}, + 'probe_protocol': {'key': 'probeProtocol', 'type': 'ProbeProtocol'}, + 'probe_interval_in_seconds': {'key': 'probeIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HealthProbeParameters, self).__init__(**kwargs) + self.probe_path = kwargs.get('probe_path', None) + self.probe_request_type = kwargs.get('probe_request_type', None) + self.probe_protocol = kwargs.get('probe_protocol', None) + self.probe_interval_in_seconds = kwargs.get('probe_interval_in_seconds', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/health_probe_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/health_probe_parameters_py3.py new file mode 100644 index 00000000000..19375af77cb --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/health_probe_parameters_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HealthProbeParameters(Model): + """The JSON object that contains the properties to send health probes to + origin. + + :param probe_path: The path relative to the origin that is used to + determine the health of the origin. + :type probe_path: str + :param probe_request_type: The type of health probe request that is made. + Possible values include: 'NotSet', 'GET', 'HEAD' + :type probe_request_type: str or + ~azure.mgmt.cdn.models.HealthProbeRequestType + :param probe_protocol: Protocol to use for health probe. Possible values + include: 'NotSet', 'Http', 'Https' + :type probe_protocol: str or ~azure.mgmt.cdn.models.ProbeProtocol + :param probe_interval_in_seconds: The number of seconds between health + probes.Default is 240sec. + :type probe_interval_in_seconds: int + """ + + _validation = { + 'probe_interval_in_seconds': {'maximum': 255, 'minimum': 1}, + } + + _attribute_map = { + 'probe_path': {'key': 'probePath', 'type': 'str'}, + 'probe_request_type': {'key': 'probeRequestType', 'type': 'HealthProbeRequestType'}, + 'probe_protocol': {'key': 'probeProtocol', 'type': 'ProbeProtocol'}, + 'probe_interval_in_seconds': {'key': 'probeIntervalInSeconds', 'type': 'int'}, + } + + def __init__(self, *, probe_path: str=None, probe_request_type=None, probe_protocol=None, probe_interval_in_seconds: int=None, **kwargs) -> None: + super(HealthProbeParameters, self).__init__(**kwargs) + self.probe_path = probe_path + self.probe_request_type = probe_request_type + self.probe_protocol = probe_protocol + self.probe_interval_in_seconds = probe_interval_in_seconds diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_error_range_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_error_range_parameters.py new file mode 100644 index 00000000000..49a4ccbe84f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_error_range_parameters.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 msrest.serialization import Model + + +class HttpErrorRangeParameters(Model): + """The JSON object that represents the range for http status codes. + + :param begin: The inclusive start of the http status code range. + :type begin: int + :param end: The inclusive end of the http status code range. + :type end: int + """ + + _validation = { + 'begin': {'maximum': 999, 'minimum': 100}, + 'end': {'maximum': 999, 'minimum': 100}, + } + + _attribute_map = { + 'begin': {'key': 'begin', 'type': 'int'}, + 'end': {'key': 'end', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(HttpErrorRangeParameters, self).__init__(**kwargs) + self.begin = kwargs.get('begin', None) + self.end = kwargs.get('end', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_error_range_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_error_range_parameters_py3.py new file mode 100644 index 00000000000..e882050a5e2 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_error_range_parameters_py3.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 msrest.serialization import Model + + +class HttpErrorRangeParameters(Model): + """The JSON object that represents the range for http status codes. + + :param begin: The inclusive start of the http status code range. + :type begin: int + :param end: The inclusive end of the http status code range. + :type end: int + """ + + _validation = { + 'begin': {'maximum': 999, 'minimum': 100}, + 'end': {'maximum': 999, 'minimum': 100}, + } + + _attribute_map = { + 'begin': {'key': 'begin', 'type': 'int'}, + 'end': {'key': 'end', 'type': 'int'}, + } + + def __init__(self, *, begin: int=None, end: int=None, **kwargs) -> None: + super(HttpErrorRangeParameters, self).__init__(**kwargs) + self.begin = begin + self.end = end diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters.py new file mode 100644 index 00000000000..efa5230ad22 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_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 HttpVersionMatchConditionParameters(Model): + """Defines the parameters for HttpVersion match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(HttpVersionMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters_py3.py new file mode 100644 index 00000000000..4bf328fa590 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/http_version_match_condition_parameters_py3.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 HttpVersionMatchConditionParameters(Model): + """Defines the parameters for HttpVersion match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None: + super(HttpVersionMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters.py new file mode 100644 index 00000000000..04d497f7c3a --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters.py @@ -0,0 +1,60 @@ +# 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 IsDeviceMatchConditionParameters(Model): + """Defines the parameters for IsDevice match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(IsDeviceMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters_py3.py new file mode 100644 index 00000000000..34b8edf9842 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/is_device_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# 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 IsDeviceMatchConditionParameters(Model): + """Defines the parameters for IsDevice match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(IsDeviceMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py index c8d08d32e39..87337f56067 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin.py @@ -33,14 +33,30 @@ class Origin(TrackedResource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param host_name: Required. The address of the origin. Domain names, IPv4 - addresses, and IPv6 addresses are supported. + :param host_name: The address of the origin. Domain names, IPv4 addresses, + and IPv6 addresses are supported.This should be unique across all origins + in an endpoint. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int - :param https_port: The value of the https port. Must be between 1 and + :param https_port: The value of the HTTPS port. Must be between 1 and 65535. :type https_port: int + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. This overrides the host header defined at Endpoint + :type origin_host_header: str + :param priority: Priority of origin in given origin group for load + balancing. Higher priorities will not be used for load balancing if any + lower priority origin is healthy.Must be between 1 and 5 + :type priority: int + :param weight: Weight of the origin in given origin group for load + balancing. Must be between 1 and 1000 + :type weight: int + :param enabled: Origin is enabled for load balancing or not + :type enabled: bool :ivar resource_state: Resource status of the origin. Possible values include: 'Creating', 'Active', 'Deleting' :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState @@ -53,9 +69,10 @@ class Origin(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'host_name': {'required': True}, 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, + 'priority': {'maximum': 5, 'minimum': 1}, + 'weight': {'maximum': 1000, 'minimum': 1}, 'resource_state': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -69,6 +86,10 @@ class Origin(TrackedResource): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'weight': {'key': 'properties.weight', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -78,5 +99,9 @@ def __init__(self, **kwargs): self.host_name = kwargs.get('host_name', None) self.http_port = kwargs.get('http_port', None) self.https_port = kwargs.get('https_port', None) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.priority = kwargs.get('priority', None) + self.weight = kwargs.get('weight', None) + self.enabled = kwargs.get('enabled', None) self.resource_state = None self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group.py new file mode 100644 index 00000000000..383dba4f7fc --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group.py @@ -0,0 +1,80 @@ +# 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 OriginGroup(ProxyResource): + """Origin group comprising of origins is used for load balancing to origins + when the content cannot be served from CDN. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param health_probe_settings: Health probe settings to the origin that is + used to determine the health of the origin. + :type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :param origins: The source of the content being delivered via CDN within + given origin group. + :type origins: list[~azure.mgmt.cdn.models.ResourceReference] + :param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: + Time in minutes to shift the traffic to the endpoint gradually when an + unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 + mins. This property is currently not supported. + :type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :param response_based_origin_error_detection_settings: The JSON object + that contains the properties to determine origin health using real + requests/responses. This property is currently not supported. + :type response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + :ivar resource_state: Resource status of the origin group. Possible values + include: 'Creating', 'Active', 'Deleting' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.OriginGroupResourceState + :ivar provisioning_state: Provisioning status of the origin group. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'}, + 'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'}, + 'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OriginGroup, self).__init__(**kwargs) + self.health_probe_settings = kwargs.get('health_probe_settings', None) + self.origins = kwargs.get('origins', None) + self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = kwargs.get('traffic_restoration_time_to_healed_or_new_endpoints_in_minutes', None) + self.response_based_origin_error_detection_settings = kwargs.get('response_based_origin_error_detection_settings', None) + self.resource_state = None + self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_paged.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_paged.py new file mode 100644 index 00000000000..15dc83b1760 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OriginGroupPaged(Paged): + """ + A paging container for iterating over a list of :class:`OriginGroup ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[OriginGroup]'} + } + + def __init__(self, *args, **kwargs): + + super(OriginGroupPaged, self).__init__(*args, **kwargs) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_py3.py new file mode 100644 index 00000000000..beb072df1bf --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_py3.py @@ -0,0 +1,80 @@ +# 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 OriginGroup(ProxyResource): + """Origin group comprising of origins is used for load balancing to origins + when the content cannot be served from CDN. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param health_probe_settings: Health probe settings to the origin that is + used to determine the health of the origin. + :type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :param origins: The source of the content being delivered via CDN within + given origin group. + :type origins: list[~azure.mgmt.cdn.models.ResourceReference] + :param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: + Time in minutes to shift the traffic to the endpoint gradually when an + unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 + mins. This property is currently not supported. + :type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :param response_based_origin_error_detection_settings: The JSON object + that contains the properties to determine origin health using real + requests/responses. This property is currently not supported. + :type response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + :ivar resource_state: Resource status of the origin group. Possible values + include: 'Creating', 'Active', 'Deleting' + :vartype resource_state: str or + ~azure.mgmt.cdn.models.OriginGroupResourceState + :ivar provisioning_state: Provisioning status of the origin group. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0}, + 'resource_state': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'}, + 'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'}, + 'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, health_probe_settings=None, origins=None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int=None, response_based_origin_error_detection_settings=None, **kwargs) -> None: + super(OriginGroup, self).__init__(**kwargs) + self.health_probe_settings = health_probe_settings + self.origins = origins + self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = traffic_restoration_time_to_healed_or_new_endpoints_in_minutes + self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings + self.resource_state = None + self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_update_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_update_parameters.py new file mode 100644 index 00000000000..e51186eadd8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_update_parameters.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OriginGroupUpdateParameters(Model): + """Origin group properties needed for origin group creation or update. + + :param health_probe_settings: Health probe settings to the origin that is + used to determine the health of the origin. + :type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :param origins: The source of the content being delivered via CDN within + given origin group. + :type origins: list[~azure.mgmt.cdn.models.ResourceReference] + :param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: + Time in minutes to shift the traffic to the endpoint gradually when an + unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 + mins. This property is currently not supported. + :type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :param response_based_origin_error_detection_settings: The JSON object + that contains the properties to determine origin health using real + requests/responses. This property is currently not supported. + :type response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + """ + + _validation = { + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'}, + 'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'}, + 'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'}, + } + + def __init__(self, **kwargs): + super(OriginGroupUpdateParameters, self).__init__(**kwargs) + self.health_probe_settings = kwargs.get('health_probe_settings', None) + self.origins = kwargs.get('origins', None) + self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = kwargs.get('traffic_restoration_time_to_healed_or_new_endpoints_in_minutes', None) + self.response_based_origin_error_detection_settings = kwargs.get('response_based_origin_error_detection_settings', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_update_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_update_parameters_py3.py new file mode 100644 index 00000000000..ee43819d301 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_group_update_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OriginGroupUpdateParameters(Model): + """Origin group properties needed for origin group creation or update. + + :param health_probe_settings: Health probe settings to the origin that is + used to determine the health of the origin. + :type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters + :param origins: The source of the content being delivered via CDN within + given origin group. + :type origins: list[~azure.mgmt.cdn.models.ResourceReference] + :param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: + Time in minutes to shift the traffic to the endpoint gradually when an + unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 + mins. This property is currently not supported. + :type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int + :param response_based_origin_error_detection_settings: The JSON object + that contains the properties to determine origin health using real + requests/responses. This property is currently not supported. + :type response_based_origin_error_detection_settings: + ~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters + """ + + _validation = { + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0}, + } + + _attribute_map = { + 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'}, + 'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'}, + 'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'}, + 'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'}, + } + + def __init__(self, *, health_probe_settings=None, origins=None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int=None, response_based_origin_error_detection_settings=None, **kwargs) -> None: + super(OriginGroupUpdateParameters, self).__init__(**kwargs) + self.health_probe_settings = health_probe_settings + self.origins = origins + self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = traffic_restoration_time_to_healed_or_new_endpoints_in_minutes + self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py index 11d56f13d92..dc969b73f38 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_py3.py @@ -33,14 +33,30 @@ class Origin(TrackedResource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param host_name: Required. The address of the origin. Domain names, IPv4 - addresses, and IPv6 addresses are supported. + :param host_name: The address of the origin. Domain names, IPv4 addresses, + and IPv6 addresses are supported.This should be unique across all origins + in an endpoint. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int - :param https_port: The value of the https port. Must be between 1 and + :param https_port: The value of the HTTPS port. Must be between 1 and 65535. :type https_port: int + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. This overrides the host header defined at Endpoint + :type origin_host_header: str + :param priority: Priority of origin in given origin group for load + balancing. Higher priorities will not be used for load balancing if any + lower priority origin is healthy.Must be between 1 and 5 + :type priority: int + :param weight: Weight of the origin in given origin group for load + balancing. Must be between 1 and 1000 + :type weight: int + :param enabled: Origin is enabled for load balancing or not + :type enabled: bool :ivar resource_state: Resource status of the origin. Possible values include: 'Creating', 'Active', 'Deleting' :vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState @@ -53,9 +69,10 @@ class Origin(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'host_name': {'required': True}, 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, + 'priority': {'maximum': 5, 'minimum': 1}, + 'weight': {'maximum': 1000, 'minimum': 1}, 'resource_state': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -69,14 +86,22 @@ class Origin(TrackedResource): 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'weight': {'key': 'properties.weight', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str, host_name: str, tags=None, http_port: int=None, https_port: int=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, host_name: str=None, http_port: int=None, https_port: int=None, origin_host_header: str=None, priority: int=None, weight: int=None, enabled: bool=None, **kwargs) -> None: super(Origin, self).__init__(location=location, tags=tags, **kwargs) self.host_name = host_name self.http_port = http_port self.https_port = https_port + self.origin_host_header = origin_host_header + self.priority = priority + self.weight = weight + self.enabled = enabled self.resource_state = None self.provisioning_state = None diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py index 605a78e80f8..90f18c52f04 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters.py @@ -13,31 +13,61 @@ class OriginUpdateParameters(Model): - """Origin properties needed for origin creation or update. + """Origin properties needed for origin update. + :param tags: Origin tags. + :type tags: dict[str, str] :param host_name: The address of the origin. Domain names, IPv4 addresses, - and IPv6 addresses are supported. + and IPv6 addresses are supported.This should be unique across all origins + in an endpoint. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int :param https_port: The value of the HTTPS port. Must be between 1 and 65535. :type https_port: int + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. This overrides the host header defined at Endpoint + :type origin_host_header: str + :param priority: Priority of origin in given origin group for load + balancing. Higher priorities will not be used for load balancing if any + lower priority origin is healthy.Must be between 1 and 5 + :type priority: int + :param weight: Weight of the origin in given origin group for load + balancing. Must be between 1 and 1000 + :type weight: int + :param enabled: Origin is enabled for load balancing or not + :type enabled: bool """ _validation = { 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, + 'priority': {'maximum': 5, 'minimum': 1}, + 'weight': {'maximum': 1000, 'minimum': 1}, } _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'weight': {'key': 'properties.weight', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } def __init__(self, **kwargs): super(OriginUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) self.host_name = kwargs.get('host_name', None) self.http_port = kwargs.get('http_port', None) self.https_port = kwargs.get('https_port', None) + self.origin_host_header = kwargs.get('origin_host_header', None) + self.priority = kwargs.get('priority', None) + self.weight = kwargs.get('weight', None) + self.enabled = kwargs.get('enabled', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py index 29be582b9a4..7e604b195f9 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/origin_update_parameters_py3.py @@ -13,31 +13,61 @@ class OriginUpdateParameters(Model): - """Origin properties needed for origin creation or update. + """Origin properties needed for origin update. + :param tags: Origin tags. + :type tags: dict[str, str] :param host_name: The address of the origin. Domain names, IPv4 addresses, - and IPv6 addresses are supported. + and IPv6 addresses are supported.This should be unique across all origins + in an endpoint. :type host_name: str :param http_port: The value of the HTTP port. Must be between 1 and 65535. :type http_port: int :param https_port: The value of the HTTPS port. Must be between 1 and 65535. :type https_port: int + :param origin_host_header: The host header value sent to the origin with + each request. If you leave this blank, the request hostname determines + this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud + Services require this host header value to match the origin hostname by + default. This overrides the host header defined at Endpoint + :type origin_host_header: str + :param priority: Priority of origin in given origin group for load + balancing. Higher priorities will not be used for load balancing if any + lower priority origin is healthy.Must be between 1 and 5 + :type priority: int + :param weight: Weight of the origin in given origin group for load + balancing. Must be between 1 and 1000 + :type weight: int + :param enabled: Origin is enabled for load balancing or not + :type enabled: bool """ _validation = { 'http_port': {'maximum': 65535, 'minimum': 1}, 'https_port': {'maximum': 65535, 'minimum': 1}, + 'priority': {'maximum': 5, 'minimum': 1}, + 'weight': {'maximum': 1000, 'minimum': 1}, } _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, 'http_port': {'key': 'properties.httpPort', 'type': 'int'}, 'https_port': {'key': 'properties.httpsPort', 'type': 'int'}, + 'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'weight': {'key': 'properties.weight', 'type': 'int'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, } - def __init__(self, *, host_name: str=None, http_port: int=None, https_port: int=None, **kwargs) -> None: + def __init__(self, *, tags=None, host_name: str=None, http_port: int=None, https_port: int=None, origin_host_header: str=None, priority: int=None, weight: int=None, enabled: bool=None, **kwargs) -> None: super(OriginUpdateParameters, self).__init__(**kwargs) + self.tags = tags self.host_name = host_name self.http_port = http_port self.https_port = https_port + self.origin_host_header = origin_host_header + self.priority = priority + self.weight = weight + self.enabled = enabled diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters.py new file mode 100644 index 00000000000..c3a5fb7e94f --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters.py @@ -0,0 +1,65 @@ +# 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 PostArgsMatchConditionParameters(Model): + """Defines the parameters for PostArgs match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of PostArg to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.PostArgsOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" + + def __init__(self, **kwargs): + super(PostArgsMatchConditionParameters, self).__init__(**kwargs) + self.selector = kwargs.get('selector', None) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters_py3.py new file mode 100644 index 00000000000..36ffaa0aadf --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/post_args_match_condition_parameters_py3.py @@ -0,0 +1,65 @@ +# 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 PostArgsMatchConditionParameters(Model): + """Defines the parameters for PostArgs match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" . + :vartype odatatype: str + :param selector: Required. Name of PostArg to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.PostArgsOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" + + def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(PostArgsMatchConditionParameters, self).__init__(**kwargs) + self.selector = selector + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters.py new file mode 100644 index 00000000000..78ba245ec6a --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters.py @@ -0,0 +1,60 @@ +# 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 QueryStringMatchConditionParameters(Model): + """Defines the parameters for QueryString match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.QueryStringOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" + + def __init__(self, **kwargs): + super(QueryStringMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters_py3.py new file mode 100644 index 00000000000..ffb53b0de37 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/query_string_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# 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 QueryStringMatchConditionParameters(Model): + """Defines the parameters for QueryString match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.QueryStringOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(QueryStringMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters.py new file mode 100644 index 00000000000..3fde65a59b3 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters.py @@ -0,0 +1,62 @@ +# 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 RemoteAddressMatchConditionParameters(Model): + """Defines the parameters for RemoteAddress match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'IPMatch', 'GeoMatch' + :type operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. Match values to match against. The operator + will apply to each value in here with OR semantics. If any of them match + the variable with the given operator this match condition is considered a + match. + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + + def __init__(self, **kwargs): + super(RemoteAddressMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters_py3.py new file mode 100644 index 00000000000..541b3e88796 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/remote_address_match_condition_parameters_py3.py @@ -0,0 +1,62 @@ +# 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 RemoteAddressMatchConditionParameters(Model): + """Defines the parameters for RemoteAddress match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'IPMatch', 'GeoMatch' + :type operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. Match values to match against. The operator + will apply to each value in here with OR semantics. If any of them match + the variable with the given operator this match condition is considered a + match. + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RemoteAddressMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters.py new file mode 100644 index 00000000000..2cb9327bf07 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters.py @@ -0,0 +1,60 @@ +# 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 RequestBodyMatchConditionParameters(Model): + """Defines the parameters for RequestBody match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" + + def __init__(self, **kwargs): + super(RequestBodyMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters_py3.py new file mode 100644 index 00000000000..8166a4bfde5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_body_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# 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 RequestBodyMatchConditionParameters(Model): + """Defines the parameters for RequestBody match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RequestBodyMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters.py new file mode 100644 index 00000000000..faec3340023 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters.py @@ -0,0 +1,66 @@ +# 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 RequestHeaderMatchConditionParameters(Model): + """Defines the parameters for RequestHeader match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + . + :vartype odatatype: str + :param selector: Required. Name of Header to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + + def __init__(self, **kwargs): + super(RequestHeaderMatchConditionParameters, self).__init__(**kwargs) + self.selector = kwargs.get('selector', None) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters_py3.py new file mode 100644 index 00000000000..66a8f764bd3 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_header_match_condition_parameters_py3.py @@ -0,0 +1,66 @@ +# 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 RequestHeaderMatchConditionParameters(Model): + """Defines the parameters for RequestHeader match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + . + :vartype odatatype: str + :param selector: Required. Name of Header to be matched + :type selector: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestHeaderOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'selector': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestHeaderConditionParameters" + + def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RequestHeaderMatchConditionParameters, self).__init__(**kwargs) + self.selector = selector + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters.py new file mode 100644 index 00000000000..d8ad9563d3a --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestMethodMatchConditionParameters(Model): + """Defines the parameters for RequestMethod match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(RequestMethodMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters_py3.py new file mode 100644 index 00000000000..4f700b75723 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_method_match_condition_parameters_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestMethodMatchConditionParameters(Model): + """Defines the parameters for RequestMethod match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None: + super(RequestMethodMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters.py new file mode 100644 index 00000000000..ea6d3b4a99c --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestSchemeMatchConditionParameters(Model): + """Defines the parameters for RequestScheme match conditions . + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + + operator = "Equal" + + def __init__(self, **kwargs): + super(RequestSchemeMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters_py3.py new file mode 100644 index 00000000000..808efe25801 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_scheme_match_condition_parameters_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RequestSchemeMatchConditionParameters(Model): + """Defines the parameters for RequestScheme match conditions . + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + . + :vartype odatatype: str + :ivar operator: Required. Describes operator to be matched. Default value: + "Equal" . + :vartype operator: str + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True, 'constant': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters" + + operator = "Equal" + + def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None: + super(RequestSchemeMatchConditionParameters, self).__init__(**kwargs) + self.negate_condition = negate_condition + self.match_values = match_values diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters.py new file mode 100644 index 00000000000..0f2024ec40d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters.py @@ -0,0 +1,60 @@ +# 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 RequestUriMatchConditionParameters(Model): + """Defines the parameters for RequestUri match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestUriOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" + + def __init__(self, **kwargs): + super(RequestUriMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters_py3.py new file mode 100644 index 00000000000..1bd5a652ce8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/request_uri_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# 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 RequestUriMatchConditionParameters(Model): + """Defines the parameters for RequestUri match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.RequestUriOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(RequestUriMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_reference.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_reference.py new file mode 100644 index 00000000000..f60004c7dcb --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_reference.py @@ -0,0 +1,28 @@ +# 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 ResourceReference(Model): + """Reference to another resource. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_reference_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_reference_py3.py new file mode 100644 index 00000000000..0501cf71543 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/resource_reference_py3.py @@ -0,0 +1,28 @@ +# 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 ResourceReference(Model): + """Reference to another resource. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(ResourceReference, self).__init__(**kwargs) + self.id = id diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/response_based_origin_error_detection_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/response_based_origin_error_detection_parameters.py new file mode 100644 index 00000000000..b9928f7613e --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/response_based_origin_error_detection_parameters.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 ResponseBasedOriginErrorDetectionParameters(Model): + """The JSON object that contains the properties to determine origin health + using real requests/responses. + + :param response_based_detected_error_types: Type of response errors for + real user requests for which origin will be deemed unhealthy. Possible + values include: 'None', 'TcpErrorsOnly', 'TcpAndHttpErrors' + :type response_based_detected_error_types: str or + ~azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes + :param response_based_failover_threshold_percentage: The percentage of + failed requests in the sample where failover should trigger. + :type response_based_failover_threshold_percentage: int + :param http_error_ranges: The list of Http status code ranges that are + considered as server errors for origin and it is marked as unhealthy. + :type http_error_ranges: + list[~azure.mgmt.cdn.models.HttpErrorRangeParameters] + """ + + _validation = { + 'response_based_failover_threshold_percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'response_based_detected_error_types': {'key': 'responseBasedDetectedErrorTypes', 'type': 'ResponseBasedDetectedErrorTypes'}, + 'response_based_failover_threshold_percentage': {'key': 'responseBasedFailoverThresholdPercentage', 'type': 'int'}, + 'http_error_ranges': {'key': 'httpErrorRanges', 'type': '[HttpErrorRangeParameters]'}, + } + + def __init__(self, **kwargs): + super(ResponseBasedOriginErrorDetectionParameters, self).__init__(**kwargs) + self.response_based_detected_error_types = kwargs.get('response_based_detected_error_types', None) + self.response_based_failover_threshold_percentage = kwargs.get('response_based_failover_threshold_percentage', None) + self.http_error_ranges = kwargs.get('http_error_ranges', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/response_based_origin_error_detection_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/response_based_origin_error_detection_parameters_py3.py new file mode 100644 index 00000000000..cf4b638d379 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/response_based_origin_error_detection_parameters_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResponseBasedOriginErrorDetectionParameters(Model): + """The JSON object that contains the properties to determine origin health + using real requests/responses. + + :param response_based_detected_error_types: Type of response errors for + real user requests for which origin will be deemed unhealthy. Possible + values include: 'None', 'TcpErrorsOnly', 'TcpAndHttpErrors' + :type response_based_detected_error_types: str or + ~azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes + :param response_based_failover_threshold_percentage: The percentage of + failed requests in the sample where failover should trigger. + :type response_based_failover_threshold_percentage: int + :param http_error_ranges: The list of Http status code ranges that are + considered as server errors for origin and it is marked as unhealthy. + :type http_error_ranges: + list[~azure.mgmt.cdn.models.HttpErrorRangeParameters] + """ + + _validation = { + 'response_based_failover_threshold_percentage': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'response_based_detected_error_types': {'key': 'responseBasedDetectedErrorTypes', 'type': 'ResponseBasedDetectedErrorTypes'}, + 'response_based_failover_threshold_percentage': {'key': 'responseBasedFailoverThresholdPercentage', 'type': 'int'}, + 'http_error_ranges': {'key': 'httpErrorRanges', 'type': '[HttpErrorRangeParameters]'}, + } + + def __init__(self, *, response_based_detected_error_types=None, response_based_failover_threshold_percentage: int=None, http_error_ranges=None, **kwargs) -> None: + super(ResponseBasedOriginErrorDetectionParameters, self).__init__(**kwargs) + self.response_based_detected_error_types = response_based_detected_error_types + self.response_based_failover_threshold_percentage = response_based_failover_threshold_percentage + self.http_error_ranges = http_error_ranges diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py index d230e2949fe..967d4833423 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py @@ -18,7 +18,8 @@ class Sku(Model): :param name: Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', + 'Premium_ChinaCdn' :type name: str or ~azure.mgmt.cdn.models.SkuName """ diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py index f85c50c65e0..de502036ba6 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py @@ -18,7 +18,8 @@ class Sku(Model): :param name: Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft', + 'Premium_ChinaCdn' :type name: str or ~azure.mgmt.cdn.models.SkuName """ diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py deleted file mode 100644 index d94baf881a3..00000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from 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. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" - . - :vartype odatatype: str - :param extensions: Required. 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, **kwargs): - super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) - self.extensions = kwargs.get('extensions', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py deleted file mode 100644 index 450c880794c..00000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_condition_parameters_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from 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. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters" - . - :vartype odatatype: str - :param extensions: Required. 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, **kwargs) -> None: - super(UrlFileExtensionConditionParameters, self).__init__(**kwargs) - self.extensions = extensions diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters.py new file mode 100644 index 00000000000..0b62d3805e1 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters.py @@ -0,0 +1,61 @@ +# 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 UrlFileExtensionMatchConditionParameters(Model): + """Defines the parameters for UrlFileExtension match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + + def __init__(self, **kwargs): + super(UrlFileExtensionMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters_py3.py new file mode 100644 index 00000000000..331f0f50385 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_extension_match_condition_parameters_py3.py @@ -0,0 +1,61 @@ +# 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 UrlFileExtensionMatchConditionParameters(Model): + """Defines the parameters for UrlFileExtension match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(UrlFileExtensionMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters.py new file mode 100644 index 00000000000..587cad99f57 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters.py @@ -0,0 +1,60 @@ +# 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 UrlFileNameMatchConditionParameters(Model): + """Defines the parameters for UrlFilename match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" + + def __init__(self, **kwargs): + super(UrlFileNameMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters_py3.py new file mode 100644 index 00000000000..04f219fb789 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_file_name_match_condition_parameters_py3.py @@ -0,0 +1,60 @@ +# 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 UrlFileNameMatchConditionParameters(Model): + """Defines the parameters for UrlFilename match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual' + :type operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(UrlFileNameMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py deleted file mode 100644 index 06b005be5c2..00000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from 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. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . - :vartype odatatype: str - :param path: Required. A URL path for the condition of the delivery rule - :type path: str - :param match_type: Required. 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, **kwargs): - super(UrlPathConditionParameters, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.match_type = kwargs.get('match_type', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py deleted file mode 100644 index c1049a0260d..00000000000 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_condition_parameters_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from 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. - - All required parameters must be populated in order to send to Azure. - - :ivar odatatype: Required. Default value: - "Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters" . - :vartype odatatype: str - :param path: Required. A URL path for the condition of the delivery rule - :type path: str - :param match_type: Required. 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: str, match_type, **kwargs) -> None: - super(UrlPathConditionParameters, self).__init__(**kwargs) - self.path = path - self.match_type = match_type diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters.py new file mode 100644 index 00000000000..2756286ffe4 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters.py @@ -0,0 +1,62 @@ +# 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 UrlPathMatchConditionParameters(Model): + """Defines the parameters for UrlPath match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + 'Wildcard' + :type operator: str or ~azure.mgmt.cdn.models.UrlPathOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + + def __init__(self, **kwargs): + super(UrlPathMatchConditionParameters, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.negate_condition = kwargs.get('negate_condition', None) + self.match_values = kwargs.get('match_values', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters_py3.py new file mode 100644 index 00000000000..bb77ba162fb --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_path_match_condition_parameters_py3.py @@ -0,0 +1,62 @@ +# 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 UrlPathMatchConditionParameters(Model): + """Defines the parameters for UrlPath match conditions. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + . + :vartype odatatype: str + :param operator: Required. Describes operator to be matched. Possible + values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith', + 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual', + 'Wildcard' + :type operator: str or ~azure.mgmt.cdn.models.UrlPathOperator + :param negate_condition: Describes if this is negate condition or not + :type negate_condition: bool + :param match_values: Required. The match value for the condition of the + delivery rule + :type match_values: list[str] + :param transforms: List of transforms + :type transforms: list[str or ~azure.mgmt.cdn.models.Transform] + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters" + + def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(UrlPathMatchConditionParameters, self).__init__(**kwargs) + self.operator = operator + self.negate_condition = negate_condition + self.match_values = match_values + self.transforms = transforms diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action.py new file mode 100644 index 00000000000..5724f3c0877 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_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 .delivery_rule_action import DeliveryRuleAction + + +class UrlRedirectAction(DeliveryRuleAction): + """Defines the url redirect action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRedirectActionParameters'}, + } + + def __init__(self, **kwargs): + super(UrlRedirectAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlRedirect' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters.py new file mode 100644 index 00000000000..b9157296cf5 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters.py @@ -0,0 +1,77 @@ +# 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 UrlRedirectActionParameters(Model): + """Defines the parameters for the url redirect action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" . + :vartype odatatype: str + :param redirect_type: Required. The redirect type the rule will use when + redirecting traffic. Possible values include: 'Moved', 'Found', + 'TemporaryRedirect', 'PermanentRedirect' + :type redirect_type: str or ~azure.mgmt.cdn.models.RedirectType + :param destination_protocol: Protocol to use for the redirect. The default + value is MatchRequest. Possible values include: 'MatchRequest', 'Http', + 'Https' + :type destination_protocol: str or + ~azure.mgmt.cdn.models.DestinationProtocol + :param custom_path: The full path to redirect. Path cannot be empty and + must start with /. Leave empty to use the incoming path as destination + path. + :type custom_path: str + :param custom_hostname: Host to redirect. Leave empty to use the incoming + host as the destination host. + :type custom_hostname: str + :param custom_query_string: The set of query strings to be placed in the + redirect URL. Setting this value would replace any existing query string; + leave empty to preserve the incoming query string. Query string must be in + = format. ? and & will be added automatically so do not + include them. + :type custom_query_string: str + :param custom_fragment: Fragment to add to the redirect URL. Fragment is + the part of the URL that comes after #. Do not include the #. + :type custom_fragment: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'redirect_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'redirect_type': {'key': 'redirectType', 'type': 'str'}, + 'destination_protocol': {'key': 'destinationProtocol', 'type': 'str'}, + 'custom_path': {'key': 'customPath', 'type': 'str'}, + 'custom_hostname': {'key': 'customHostname', 'type': 'str'}, + 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, + 'custom_fragment': {'key': 'customFragment', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" + + def __init__(self, **kwargs): + super(UrlRedirectActionParameters, self).__init__(**kwargs) + self.redirect_type = kwargs.get('redirect_type', None) + self.destination_protocol = kwargs.get('destination_protocol', None) + self.custom_path = kwargs.get('custom_path', None) + self.custom_hostname = kwargs.get('custom_hostname', None) + self.custom_query_string = kwargs.get('custom_query_string', None) + self.custom_fragment = kwargs.get('custom_fragment', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters_py3.py new file mode 100644 index 00000000000..a69c266ef37 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_parameters_py3.py @@ -0,0 +1,77 @@ +# 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 UrlRedirectActionParameters(Model): + """Defines the parameters for the url redirect action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" . + :vartype odatatype: str + :param redirect_type: Required. The redirect type the rule will use when + redirecting traffic. Possible values include: 'Moved', 'Found', + 'TemporaryRedirect', 'PermanentRedirect' + :type redirect_type: str or ~azure.mgmt.cdn.models.RedirectType + :param destination_protocol: Protocol to use for the redirect. The default + value is MatchRequest. Possible values include: 'MatchRequest', 'Http', + 'Https' + :type destination_protocol: str or + ~azure.mgmt.cdn.models.DestinationProtocol + :param custom_path: The full path to redirect. Path cannot be empty and + must start with /. Leave empty to use the incoming path as destination + path. + :type custom_path: str + :param custom_hostname: Host to redirect. Leave empty to use the incoming + host as the destination host. + :type custom_hostname: str + :param custom_query_string: The set of query strings to be placed in the + redirect URL. Setting this value would replace any existing query string; + leave empty to preserve the incoming query string. Query string must be in + = format. ? and & will be added automatically so do not + include them. + :type custom_query_string: str + :param custom_fragment: Fragment to add to the redirect URL. Fragment is + the part of the URL that comes after #. Do not include the #. + :type custom_fragment: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'redirect_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'redirect_type': {'key': 'redirectType', 'type': 'str'}, + 'destination_protocol': {'key': 'destinationProtocol', 'type': 'str'}, + 'custom_path': {'key': 'customPath', 'type': 'str'}, + 'custom_hostname': {'key': 'customHostname', 'type': 'str'}, + 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, + 'custom_fragment': {'key': 'customFragment', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" + + def __init__(self, *, redirect_type, destination_protocol=None, custom_path: str=None, custom_hostname: str=None, custom_query_string: str=None, custom_fragment: str=None, **kwargs) -> None: + super(UrlRedirectActionParameters, self).__init__(**kwargs) + self.redirect_type = redirect_type + self.destination_protocol = destination_protocol + self.custom_path = custom_path + self.custom_hostname = custom_hostname + self.custom_query_string = custom_query_string + self.custom_fragment = custom_fragment diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_py3.py new file mode 100644 index 00000000000..05d16be2d6d --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_redirect_action_py3.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 .delivery_rule_action_py3 import DeliveryRuleAction + + +class UrlRedirectAction(DeliveryRuleAction): + """Defines the url redirect action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRedirectActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(UrlRedirectAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlRedirect' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action.py new file mode 100644 index 00000000000..37e4aebb1c8 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_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 .delivery_rule_action import DeliveryRuleAction + + +class UrlRewriteAction(DeliveryRuleAction): + """Defines the url rewrite action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRewriteActionParameters'}, + } + + def __init__(self, **kwargs): + super(UrlRewriteAction, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.name = 'UrlRewrite' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters.py new file mode 100644 index 00000000000..39070c2b0d3 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlRewriteActionParameters(Model): + """Defines the parameters for the url rewrite action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" . + :vartype odatatype: str + :param source_pattern: Required. define a request URI pattern that + identifies the type of requests that may be rewritten. If value is blank, + all strings are matched. + :type source_pattern: str + :param destination: Required. Define the relative URL to which the above + requests will be rewritten by. + :type destination: str + :param preserve_unmatched_path: Whether to preserve unmatched path. + Default value is true. + :type preserve_unmatched_path: bool + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'source_pattern': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'source_pattern': {'key': 'sourcePattern', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'preserve_unmatched_path': {'key': 'preserveUnmatchedPath', 'type': 'bool'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" + + def __init__(self, **kwargs): + super(UrlRewriteActionParameters, self).__init__(**kwargs) + self.source_pattern = kwargs.get('source_pattern', None) + self.destination = kwargs.get('destination', None) + self.preserve_unmatched_path = kwargs.get('preserve_unmatched_path', None) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters_py3.py new file mode 100644 index 00000000000..de75a19515c --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_parameters_py3.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UrlRewriteActionParameters(Model): + """Defines the parameters for the url rewrite action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar odatatype: Required. Default value: + "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" . + :vartype odatatype: str + :param source_pattern: Required. define a request URI pattern that + identifies the type of requests that may be rewritten. If value is blank, + all strings are matched. + :type source_pattern: str + :param destination: Required. Define the relative URL to which the above + requests will be rewritten by. + :type destination: str + :param preserve_unmatched_path: Whether to preserve unmatched path. + Default value is true. + :type preserve_unmatched_path: bool + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'source_pattern': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'source_pattern': {'key': 'sourcePattern', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'preserve_unmatched_path': {'key': 'preserveUnmatchedPath', 'type': 'bool'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" + + def __init__(self, *, source_pattern: str, destination: str, preserve_unmatched_path: bool=None, **kwargs) -> None: + super(UrlRewriteActionParameters, self).__init__(**kwargs) + self.source_pattern = source_pattern + self.destination = destination + self.preserve_unmatched_path = preserve_unmatched_path diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_py3.py new file mode 100644 index 00000000000..cb24ab05594 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/url_rewrite_action_py3.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 .delivery_rule_action_py3 import DeliveryRuleAction + + +class UrlRewriteAction(DeliveryRuleAction): + """Defines the url rewrite action for the delivery rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Constant filled by server. + :type name: str + :param parameters: Required. Defines the parameters for the action. + :type parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters + """ + + _validation = { + 'name': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'UrlRewriteActionParameters'}, + } + + def __init__(self, *, parameters, **kwargs) -> None: + super(UrlRewriteAction, self).__init__(**kwargs) + self.parameters = parameters + self.name = 'UrlRewrite' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py index 1153a4f390d..80530b46ce3 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py @@ -22,6 +22,9 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,6 +41,7 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'KeyVaultCertificateSourceParameters'}, } diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py index 7a87fe51b92..ee03188794d 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py @@ -22,6 +22,9 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): used for secure delivery. Possible values include: 'ServerNameIndication', 'IPBased' :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param minimum_tls_version: TLS protocol version that will be used for + Https. Possible values include: 'None', 'TLS10', 'TLS12' + :type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion :param certificate_source: Required. Constant filled by server. :type certificate_source: str :param certificate_source_parameters: Required. Defines the certificate @@ -38,11 +41,12 @@ class UserManagedHttpsParameters(CustomDomainHttpsParameters): _attribute_map = { 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'}, 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'KeyVaultCertificateSourceParameters'}, } - def __init__(self, *, protocol_type, certificate_source_parameters, **kwargs) -> None: - super(UserManagedHttpsParameters, self).__init__(protocol_type=protocol_type, **kwargs) + def __init__(self, *, protocol_type, certificate_source_parameters, minimum_tls_version=None, **kwargs) -> None: + super(UserManagedHttpsParameters, self).__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs) self.certificate_source_parameters = certificate_source_parameters self.certificate_source = 'AzureKeyVault' diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py index 4a59e48a845..7ac27daec9b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/__init__.py @@ -12,6 +12,7 @@ from .profiles_operations import ProfilesOperations from .endpoints_operations import EndpointsOperations from .origins_operations import OriginsOperations +from .origin_groups_operations import OriginGroupsOperations from .custom_domains_operations import CustomDomainsOperations from .resource_usage_operations import ResourceUsageOperations from .operations import Operations @@ -21,6 +22,7 @@ 'ProfilesOperations', 'EndpointsOperations', 'OriginsOperations', + 'OriginGroupsOperations', 'CustomDomainsOperations', 'ResourceUsageOperations', 'Operations', diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index 554289209e1..f07edf9497b 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -24,7 +24,7 @@ class CustomDomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :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". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py index cc5d5a8bf53..e593054a5b8 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py @@ -22,7 +22,7 @@ class EdgeNodesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :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". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py index a0f80db8237..b5a0073c8ba 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py @@ -24,7 +24,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: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config @@ -342,10 +342,11 @@ def _update_initial( def update( self, resource_group_name, profile_name, endpoint_name, endpoint_update_properties, custom_headers=None, raw=False, polling=True, **operation_config): """Updates an existing CDN endpoint with the specified endpoint name under - the specified subscription, resource group and profile. Only tags and - Origin HostHeader can be updated after creating an endpoint. To update - origins, use the Update Origin operation. To update custom domains, use - the Update Custom Domain operation. + the specified subscription, resource group and profile. Only tags can + be updated after creating an endpoint. To update origins, use the + Update Origin operation. To update origin groups, use the Update Origin + group operation. To update custom domains, use the Update Custom Domain + operation. :param resource_group_name: Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py index 6df470f3e38..5dcf5f8e44a 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :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". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origin_groups_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origin_groups_operations.py new file mode 100644 index 00000000000..a79cae2e433 --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origin_groups_operations.py @@ -0,0 +1,504 @@ +# 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 msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class OriginGroupsOperations(object): + """OriginGroupsOperations 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: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-12-31" + + self.config = config + + def list_by_endpoint( + self, resource_group_name, profile_name, endpoint_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the existing origin groups within an endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of OriginGroup + :rtype: + ~azure.mgmt.cdn.models.OriginGroupPaged[~azure.mgmt.cdn.models.OriginGroup] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OriginGroupPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OriginGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_endpoint.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups'} + + def get( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, custom_headers=None, raw=False, **operation_config): + """Gets an existing origin group within an endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique + within the endpoint. + :type origin_group_name: str + :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: OriginGroup or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cdn.models.OriginGroup or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'originGroupName': self._serialize.url("origin_group_name", origin_group_name, 'str'), + '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['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OriginGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'} + + + def _create_initial( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, origin_group, custom_headers=None, raw=False, **operation_config): + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'originGroupName': self._serialize.url("origin_group_name", origin_group_name, 'str'), + '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['Accept'] = 'application/json' + 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 body + body_content = self._serialize.body(origin_group, 'OriginGroup') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OriginGroup', response) + if response.status_code == 201: + deserialized = self._deserialize('OriginGroup', response) + if response.status_code == 202: + deserialized = self._deserialize('OriginGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, origin_group, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new origin group within the specified endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique + within the endpoint. + :type origin_group_name: str + :param origin_group: Origin group properties + :type origin_group: ~azure.mgmt.cdn.models.OriginGroup + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OriginGroup or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.OriginGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.OriginGroup]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + origin_group=origin_group, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OriginGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'} + + + def _update_initial( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, origin_group_update_properties, custom_headers=None, raw=False, **operation_config): + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'originGroupName': self._serialize.url("origin_group_name", origin_group_name, 'str'), + '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['Accept'] = 'application/json' + 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 body + body_content = self._serialize.body(origin_group_update_properties, 'OriginGroupUpdateParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OriginGroup', response) + if response.status_code == 202: + deserialized = self._deserialize('OriginGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, origin_group_update_properties, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates an existing origin group within an endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique + within the endpoint. + :type origin_group_name: str + :param origin_group_update_properties: Origin group properties + :type origin_group_update_properties: + ~azure.mgmt.cdn.models.OriginGroupUpdateParameters + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns OriginGroup or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.OriginGroup] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.OriginGroup]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + origin_group_update_properties=origin_group_update_properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OriginGroup', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'} + + + def _delete_initial( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'originGroupName': self._serialize.url("origin_group_name", origin_group_name, 'str'), + '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 = {} + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, profile_name, endpoint_name, origin_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing origin group within an endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param origin_group_name: Name of the origin group which is unique + within the endpoint. + :type origin_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_group_name=origin_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/originGroups/{originGroupName}'} diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py index d523c944afb..f4776ad0d3e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py @@ -24,7 +24,7 @@ class OriginsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :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". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config @@ -185,6 +185,121 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} + def _create_initial( + self, resource_group_name, profile_name, endpoint_name, origin_name, origin, custom_headers=None, raw=False, **operation_config): + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'originName': self._serialize.url("origin_name", origin_name, 'str'), + '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['Accept'] = 'application/json' + 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 body + body_content = self._serialize.body(origin, 'Origin') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Origin', response) + if response.status_code == 201: + deserialized = self._deserialize('Origin', response) + if response.status_code == 202: + deserialized = self._deserialize('Origin', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, profile_name, endpoint_name, origin_name, origin, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new origin within the specified endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param origin_name: Name of the origin that is unique within the + endpoint. + :type origin_name: str + :param origin: Origin properties + :type origin: ~azure.mgmt.cdn.models.Origin + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Origin or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cdn.models.Origin] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cdn.models.Origin]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + origin=origin, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Origin', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.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 @@ -297,3 +412,93 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} + + + def _delete_initial( + self, resource_group_name, profile_name, endpoint_name, origin_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + 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'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'originName': self._serialize.url("origin_name", origin_name, 'str'), + '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 = {} + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, profile_name, endpoint_name, origin_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes an existing origin within an endpoint. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within + the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is + unique globally. + :type endpoint_name: str + :param origin_name: Name of the origin which is unique within the + endpoint. + :type origin_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + profile_name=profile_name, + endpoint_name=endpoint_name, + origin_name=origin_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/origins/{originName}'} diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index 7a90cfb55de..ccada0f3784 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -24,7 +24,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: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2017-10-12". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py index 12c58aea0d1..9f20e020e6e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py @@ -22,7 +22,7 @@ class ResourceUsageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :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". + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-04-02. Constant value: "2019-12-31". """ 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-10-12" + self.api_version = "2019-12-31" self.config = config diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py index 9797f3dd001..53c4c7ea05e 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "2.0.0" diff --git a/sdk/cdn/azure-mgmt-cdn/setup.py b/sdk/cdn/azure-mgmt-cdn/setup.py index 2043f21c729..c0e64112e92 100644 --- a/sdk/cdn/azure-mgmt-cdn/setup.py +++ b/sdk/cdn/azure-mgmt-cdn/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',