From a53e2fa521b7b2a22bc88b965326fd1bcfea94aa Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 5 Mar 2019 18:29:58 -0800 Subject: [PATCH] [AutoPR] cdn/resource-manager (#3184) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Generated from 8b60f3bd649da2d300d260eefccbc22b7b4a417d (#3129) adding standard_microsoft in pricing tier * [AutoPR cdn/resource-manager] typo: cdn/resource-manager/Microsoft.Cdn/cdn.json (#3837) * Generated from 9bd4d439bc4da2a8dc8ba1020df951c35007f0ba typo: cdn/resource-manager/Microsoft.Cdn/cdn.json - Supplemnetal -> Supplemental - pictires -> pictures - exisitng -> existing - Double word "the" - acess -> access - adress -> address - reponse -> response * Packaging update of azure-mgmt-cdn * Generated from d0c6effd968d5d082f79c835c398167e86320763 (#3907) typo: Microsoft.Cdn - subscitption -> subscription - consoto -> contoso - adress -> address * Packaging update of azure-mgmt-cdn * [AutoPR cdn/resource-manager] Enable SSL on custom domains for CDN using users certificate or CDN managed c… (#4435) * Generated from 8ee873d5b30f4242e9967ea63fa128155f0904a3 Enable SSL on custom domains using users certificate or CDN managed certificate * Packaging update of azure-mgmt-cdn * 3.1.0 * Packaging update of azure-mgmt-cdn --- azure-mgmt-cdn/HISTORY.rst | 11 +- azure-mgmt-cdn/MANIFEST.in | 4 + azure-mgmt-cdn/README.rst | 19 -- .../azure/mgmt/cdn/cdn_management_client.py | 18 +- .../azure/mgmt/cdn/models/__init__.py | 19 ++ .../cache_expiration_action_parameters.py | 2 +- .../cache_expiration_action_parameters_py3.py | 2 +- .../cdn_certificate_source_parameters.py | 46 ++++ .../cdn_certificate_source_parameters_py3.py | 46 ++++ .../models/cdn_managed_https_parameters.py | 48 ++++ .../cdn_managed_https_parameters_py3.py | 48 ++++ .../cdn/models/cdn_management_client_enums.py | 13 + .../azure/mgmt/cdn/models/cidr_ip_address.py | 2 +- .../mgmt/cdn/models/cidr_ip_address_py3.py | 2 +- .../azure/mgmt/cdn/models/custom_domain.py | 2 +- .../models/custom_domain_https_parameters.py | 48 ++++ .../custom_domain_https_parameters_py3.py | 48 ++++ .../mgmt/cdn/models/custom_domain_py3.py | 2 +- .../azure/mgmt/cdn/models/endpoint.py | 8 +- .../azure/mgmt/cdn/models/endpoint_py3.py | 8 +- .../cdn/models/endpoint_update_parameters.py | 6 +- .../models/endpoint_update_parameters_py3.py | 6 +- .../azure/mgmt/cdn/models/error_response.py | 2 +- .../mgmt/cdn/models/error_response_py3.py | 2 +- ...key_vault_certificate_source_parameters.py | 84 +++++++ ...vault_certificate_source_parameters_py3.py | 84 +++++++ azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py | 2 +- .../azure/mgmt/cdn/models/sku_py3.py | 2 +- .../models/user_managed_https_parameters.py | 48 ++++ .../user_managed_https_parameters_py3.py | 48 ++++ .../operations/custom_domains_operations.py | 52 ++-- .../cdn/operations/edge_nodes_operations.py | 7 +- .../cdn/operations/endpoints_operations.py | 65 +++-- .../azure/mgmt/cdn/operations/operations.py | 7 +- .../mgmt/cdn/operations/origins_operations.py | 19 +- .../cdn/operations/profiles_operations.py | 58 +++-- .../operations/resource_usage_operations.py | 7 +- azure-mgmt-cdn/azure/mgmt/cdn/version.py | 2 +- azure-mgmt-cdn/build.json | 225 ------------------ 39 files changed, 734 insertions(+), 388 deletions(-) create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters_py3.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters_py3.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py create mode 100644 azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py delete mode 100644 azure-mgmt-cdn/build.json diff --git a/azure-mgmt-cdn/HISTORY.rst b/azure-mgmt-cdn/HISTORY.rst index cabe733fd844..f9f831e53db9 100644 --- a/azure-mgmt-cdn/HISTORY.rst +++ b/azure-mgmt-cdn/HISTORY.rst @@ -3,6 +3,13 @@ Release History =============== +3.1.0 (2019-03-05) +++++++++++++++++++ + +**Features** + +- Add custom_domain_https_parameters support + 3.0.0 (2018-05-25) ++++++++++++++++++ @@ -31,7 +38,7 @@ This version uses a next-generation code generator that *might* introduce breaki - Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same. - Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used. - - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, + - The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`, without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`. - New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`, the response of the initial call will be returned without polling. @@ -68,7 +75,7 @@ Api version changed from 2016-10-02 to 2017-04-02 **Breaking changes** - Rename check_resource_usage to list_resource_usage -- list EdgeNode now returns an iterator of EdgeNode, +- list EdgeNode now returns an iterator of EdgeNode, not a EdgenodeResult instance with an attribute "value" being a list of EdgeNode 0.30.3 (2017-05-15) diff --git a/azure-mgmt-cdn/MANIFEST.in b/azure-mgmt-cdn/MANIFEST.in index bb37a2723dae..e4884efef41b 100644 --- a/azure-mgmt-cdn/MANIFEST.in +++ b/azure-mgmt-cdn/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-cdn/README.rst b/azure-mgmt-cdn/README.rst index f2521f44e0ed..860062d8cab1 100644 --- a/azure-mgmt-cdn/README.rst +++ b/azure-mgmt-cdn/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py index afba70d709ab..cba63c568f39 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py @@ -143,6 +143,7 @@ def check_name_availability( # 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()) @@ -155,9 +156,8 @@ def check_name_availability( body_content = self._serialize.body(check_name_availability_input, 'CheckNameAvailabilityInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -207,6 +207,7 @@ def check_name_availability_with_subscription( # 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()) @@ -219,9 +220,8 @@ def check_name_availability_with_subscription( body_content = self._serialize.body(check_name_availability_input, 'CheckNameAvailabilityInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -274,6 +274,7 @@ def validate_probe( # 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()) @@ -286,9 +287,8 @@ def validate_probe( body_content = self._serialize.body(validate_probe_input, 'ValidateProbeInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py index 4c839265f66b..2e382b4c0864 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py @@ -35,6 +35,11 @@ from .origin_update_parameters_py3 import OriginUpdateParameters from .custom_domain_py3 import CustomDomain from .custom_domain_parameters_py3 import CustomDomainParameters + from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters + from .cdn_certificate_source_parameters_py3 import CdnCertificateSourceParameters + from .cdn_managed_https_parameters_py3 import CdnManagedHttpsParameters + from .key_vault_certificate_source_parameters_py3 import KeyVaultCertificateSourceParameters + from .user_managed_https_parameters_py3 import UserManagedHttpsParameters from .validate_custom_domain_input_py3 import ValidateCustomDomainInput from .validate_custom_domain_output_py3 import ValidateCustomDomainOutput from .check_name_availability_input_py3 import CheckNameAvailabilityInput @@ -77,6 +82,11 @@ from .origin_update_parameters import OriginUpdateParameters from .custom_domain import CustomDomain from .custom_domain_parameters import CustomDomainParameters + from .custom_domain_https_parameters import CustomDomainHttpsParameters + from .cdn_certificate_source_parameters import CdnCertificateSourceParameters + from .cdn_managed_https_parameters import CdnManagedHttpsParameters + from .key_vault_certificate_source_parameters import KeyVaultCertificateSourceParameters + from .user_managed_https_parameters import UserManagedHttpsParameters from .validate_custom_domain_input import ValidateCustomDomainInput from .validate_custom_domain_output import ValidateCustomDomainOutput from .check_name_availability_input import CheckNameAvailabilityInput @@ -111,6 +121,8 @@ CustomDomainResourceState, CustomHttpsProvisioningState, CustomHttpsProvisioningSubstate, + ProtocolType, + CertificateType, ResourceType, ) @@ -140,6 +152,11 @@ 'OriginUpdateParameters', 'CustomDomain', 'CustomDomainParameters', + 'CustomDomainHttpsParameters', + 'CdnCertificateSourceParameters', + 'CdnManagedHttpsParameters', + 'KeyVaultCertificateSourceParameters', + 'UserManagedHttpsParameters', 'ValidateCustomDomainInput', 'ValidateCustomDomainOutput', 'CheckNameAvailabilityInput', @@ -173,5 +190,7 @@ 'CustomDomainResourceState', 'CustomHttpsProvisioningState', 'CustomHttpsProvisioningSubstate', + 'ProtocolType', + 'CertificateType', 'ResourceType', ] diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py index 733f37ee6e40..43cd9fa3b5cf 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters.py @@ -30,7 +30,7 @@ class CacheExpirationActionParameters(Model): :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str - :param cache_duration: The duration for which the the content needs to be + :param cache_duration: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss :type cache_duration: str """ diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py index b962f37e0b09..1b178db8df95 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cache_expiration_action_parameters_py3.py @@ -30,7 +30,7 @@ class CacheExpirationActionParameters(Model): :ivar cache_type: Required. The level at which the content needs to be cached. Default value: "All" . :vartype cache_type: str - :param cache_duration: The duration for which the the content needs to be + :param cache_duration: The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss :type cache_duration: str """ diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters.py new file mode 100644 index 000000000000..295b8bf5aa1c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CdnCertificateSourceParameters(Model): + """Defines the parameters for using CDN managed certificate for securing + custom domain. + + 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.CdnCertificateSourceParameters" . + :vartype odatatype: str + :param certificate_type: Required. Type of certificate used. Possible + values include: 'Shared', 'Dedicated' + :type certificate_type: str or ~azure.mgmt.cdn.models.CertificateType + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'certificate_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'certificate_type': {'key': 'certificateType', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters" + + def __init__(self, **kwargs): + super(CdnCertificateSourceParameters, self).__init__(**kwargs) + self.certificate_type = kwargs.get('certificate_type', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters_py3.py new file mode 100644 index 000000000000..97875af4c74f --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_certificate_source_parameters_py3.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CdnCertificateSourceParameters(Model): + """Defines the parameters for using CDN managed certificate for securing + custom domain. + + 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.CdnCertificateSourceParameters" . + :vartype odatatype: str + :param certificate_type: Required. Type of certificate used. Possible + values include: 'Shared', 'Dedicated' + :type certificate_type: str or ~azure.mgmt.cdn.models.CertificateType + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'certificate_type': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'certificate_type': {'key': 'certificateType', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters" + + def __init__(self, *, certificate_type, **kwargs) -> None: + super(CdnCertificateSourceParameters, self).__init__(**kwargs) + self.certificate_type = certificate_type diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py new file mode 100644 index 000000000000..3c9a2bcca295 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .custom_domain_https_parameters import CustomDomainHttpsParameters + + +class CdnManagedHttpsParameters(CustomDomainHttpsParameters): + """Defines the certificate source parameters using CDN managed certificate for + enabling SSL. + + All required parameters must be populated in order to send to Azure. + + :param protocol_type: Required. Defines the TLS extension protocol that is + used for secure delivery. Possible values include: 'ServerNameIndication', + 'IPBased' + :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param certificate_source: Required. Constant filled by server. + :type certificate_source: str + :param certificate_source_parameters: Required. Defines the certificate + source parameters using CDN managed certificate for enabling SSL. + :type certificate_source_parameters: + ~azure.mgmt.cdn.models.CdnCertificateSourceParameters + """ + + _validation = { + 'protocol_type': {'required': True}, + 'certificate_source': {'required': True}, + 'certificate_source_parameters': {'required': True}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, + 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'}, + } + + def __init__(self, **kwargs): + super(CdnManagedHttpsParameters, self).__init__(**kwargs) + self.certificate_source_parameters = kwargs.get('certificate_source_parameters', None) + self.certificate_source = 'Cdn' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py new file mode 100644 index 000000000000..909a93392f89 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_managed_https_parameters_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters + + +class CdnManagedHttpsParameters(CustomDomainHttpsParameters): + """Defines the certificate source parameters using CDN managed certificate for + enabling SSL. + + All required parameters must be populated in order to send to Azure. + + :param protocol_type: Required. Defines the TLS extension protocol that is + used for secure delivery. Possible values include: 'ServerNameIndication', + 'IPBased' + :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param certificate_source: Required. Constant filled by server. + :type certificate_source: str + :param certificate_source_parameters: Required. Defines the certificate + source parameters using CDN managed certificate for enabling SSL. + :type certificate_source_parameters: + ~azure.mgmt.cdn.models.CdnCertificateSourceParameters + """ + + _validation = { + 'protocol_type': {'required': True}, + 'certificate_source': {'required': True}, + 'certificate_source_parameters': {'required': True}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + '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) + self.certificate_source_parameters = certificate_source_parameters + self.certificate_source = 'Cdn' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py index 591e7b58f03e..0a15a6028eaf 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cdn_management_client_enums.py @@ -19,6 +19,7 @@ class SkuName(str, Enum): custom_verizon = "Custom_Verizon" standard_akamai = "Standard_Akamai" standard_china_cdn = "Standard_ChinaCdn" + standard_microsoft = "Standard_Microsoft" class ProfileResourceState(str, Enum): @@ -99,6 +100,18 @@ class CustomHttpsProvisioningSubstate(str, Enum): certificate_deleted = "CertificateDeleted" +class ProtocolType(str, Enum): + + server_name_indication = "ServerNameIndication" + ip_based = "IPBased" + + +class CertificateType(str, Enum): + + shared = "Shared" + dedicated = "Dedicated" + + class ResourceType(str, Enum): microsoft_cdn_profiles_endpoints = "Microsoft.Cdn/Profiles/Endpoints" diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py index c37e0ac9b254..710ae8c8d3c8 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address.py @@ -15,7 +15,7 @@ class CidrIpAddress(Model): """CIDR Ip address. - :param base_ip_address: Ip adress itself. + :param base_ip_address: Ip address itself. :type base_ip_address: str :param prefix_length: The length of the prefix of the ip address. :type prefix_length: int diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py index 6eba08681803..9f8527080feb 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/cidr_ip_address_py3.py @@ -15,7 +15,7 @@ class CidrIpAddress(Model): """CIDR Ip address. - :param base_ip_address: Ip adress itself. + :param base_ip_address: Ip address itself. :type base_ip_address: str :param prefix_length: The length of the prefix of the ip address. :type prefix_length: int diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py index 06bfef84aca2..277792da086a 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py @@ -14,7 +14,7 @@ class CustomDomain(ProxyResource): """Friendly domain name mapping to the endpoint hostname that the customer - provides for branding purposes, e.g. www.consoto.com. + provides for branding purposes, e.g. www.contoso.com. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py new file mode 100644 index 000000000000..c854a87ff851 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomainHttpsParameters(Model): + """The JSON object that contains the properties to secure a custom domain. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CdnManagedHttpsParameters, UserManagedHttpsParameters + + All required parameters must be populated in order to send to Azure. + + :param protocol_type: Required. Defines the TLS extension protocol that is + used for secure delivery. Possible values include: 'ServerNameIndication', + 'IPBased' + :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param certificate_source: Required. Constant filled by server. + :type certificate_source: str + """ + + _validation = { + 'protocol_type': {'required': True}, + 'certificate_source': {'required': True}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, + } + + _subtype_map = { + 'certificate_source': {'Cdn': 'CdnManagedHttpsParameters', 'AzureKeyVault': 'UserManagedHttpsParameters'} + } + + def __init__(self, **kwargs): + super(CustomDomainHttpsParameters, self).__init__(**kwargs) + self.protocol_type = kwargs.get('protocol_type', None) + self.certificate_source = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py new file mode 100644 index 000000000000..97bfd1838cba --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_https_parameters_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CustomDomainHttpsParameters(Model): + """The JSON object that contains the properties to secure a custom domain. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CdnManagedHttpsParameters, UserManagedHttpsParameters + + All required parameters must be populated in order to send to Azure. + + :param protocol_type: Required. Defines the TLS extension protocol that is + used for secure delivery. Possible values include: 'ServerNameIndication', + 'IPBased' + :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param certificate_source: Required. Constant filled by server. + :type certificate_source: str + """ + + _validation = { + 'protocol_type': {'required': True}, + 'certificate_source': {'required': True}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, + } + + _subtype_map = { + 'certificate_source': {'Cdn': 'CdnManagedHttpsParameters', 'AzureKeyVault': 'UserManagedHttpsParameters'} + } + + def __init__(self, *, protocol_type, **kwargs) -> None: + super(CustomDomainHttpsParameters, self).__init__(**kwargs) + self.protocol_type = protocol_type + self.certificate_source = None diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py index e0679e355d60..b1426b283645 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain_py3.py @@ -14,7 +14,7 @@ class CustomDomain(ProxyResource): """Friendly domain name mapping to the endpoint hostname that the customer - provides for branding purposes, e.g. www.consoto.com. + provides for branding purposes, e.g. www.contoso.com. Variables are only populated by the server, and will be ignored when sending a request. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py index ae5f039a3f00..3c4db7a3272e 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint.py @@ -40,7 +40,7 @@ class Endpoint(TrackedResource): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + 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. @@ -78,15 +78,15 @@ class Endpoint(TrackedResource): routes for the CDN. This is relative to the origin path. :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 acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + 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 delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. :type delivery_policy: ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy :ivar host_name: The host name of the endpoint structured as - {endpointName}.{DNSZone}, e.g. consoto.azureedge.net + {endpointName}.{DNSZone}, e.g. contoso.azureedge.net :vartype host_name: str :param origins: Required. The source of the content being delivered via CDN. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py index 2f44460c0f4b..9c6a32cc6bd9 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_py3.py @@ -40,7 +40,7 @@ class Endpoint(TrackedResource): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + 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. @@ -78,15 +78,15 @@ class Endpoint(TrackedResource): routes for the CDN. This is relative to the origin path. :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 acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + 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 delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. :type delivery_policy: ~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy :ivar host_name: The host name of the endpoint structured as - {endpointName}.{DNSZone}, e.g. consoto.azureedge.net + {endpointName}.{DNSZone}, e.g. contoso.azureedge.net :vartype host_name: str :param origins: Required. The source of the content being delivered via CDN. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py index 36ec115ceb78..0a1ed8c7706d 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters.py @@ -24,7 +24,7 @@ class EndpointUpdateParameters(Model): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + 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. @@ -62,8 +62,8 @@ class EndpointUpdateParameters(Model): routes for the CDN. This is relative to the origin path. :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 acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + 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 delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py index ed4a7fdd9d60..e18452cae71f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/endpoint_update_parameters_py3.py @@ -24,7 +24,7 @@ class EndpointUpdateParameters(Model): default. :type origin_host_header: str :param origin_path: A directory path on the origin that CDN can use to - retreive content from, e.g. contoso.cloudapp.net/originpath. + 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. @@ -62,8 +62,8 @@ class EndpointUpdateParameters(Model): routes for the CDN. This is relative to the origin path. :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 acess rule to a specified path or - content, e.g. block APAC for path /pictures/ + 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 delivery_policy: A policy that specifies the delivery rules to be used for an endpoint. diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py index 2e1c74ac09c5..f5e34718e3e3 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates CDN service is not able to process the incoming + """Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py index 89e755f309dc..5bf98d6b9075 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/error_response_py3.py @@ -14,7 +14,7 @@ class ErrorResponse(Model): - """Error reponse indicates CDN service is not able to process the incoming + """Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. Variables are only populated by the server, and will be ignored when diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters.py new file mode 100644 index 000000000000..f005eda72e8b --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters.py @@ -0,0 +1,84 @@ +# 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 KeyVaultCertificateSourceParameters(Model): + """Describes the parameters for using a user's KeyVault certificate for + securing custom domain. + + 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.KeyVaultCertificateSourceParameters" . + :vartype odatatype: str + :param subscription_id: Required. Subscription Id of the user's Key Vault + containing the SSL certificate + :type subscription_id: str + :param resource_group_name: Required. Resource group of the user's Key + Vault containing the SSL certificate + :type resource_group_name: str + :param vault_name: Required. The name of the user's Key Vault containing + the SSL certificate + :type vault_name: str + :param secret_name: Required. The name of Key Vault Secret (representing + the full certificate PFX) in Key Vault. + :type secret_name: str + :param secret_version: Required. The version(GUID) of Key Vault Secret in + Key Vault. + :type secret_version: str + :ivar update_rule: Required. Describes the action that shall be taken when + the certificate is updated in Key Vault. Default value: "NoAction" . + :vartype update_rule: str + :ivar delete_rule: Required. Describes the action that shall be taken when + the certificate is removed from Key Vault. Default value: "NoAction" . + :vartype delete_rule: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'vault_name': {'required': True}, + 'secret_name': {'required': True}, + 'secret_version': {'required': True}, + 'update_rule': {'required': True, 'constant': True}, + 'delete_rule': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'secret_version': {'key': 'secretVersion', 'type': 'str'}, + 'update_rule': {'key': 'updateRule', 'type': 'str'}, + 'delete_rule': {'key': 'deleteRule', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.KeyVaultCertificateSourceParameters" + + update_rule = "NoAction" + + delete_rule = "NoAction" + + def __init__(self, **kwargs): + super(KeyVaultCertificateSourceParameters, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.vault_name = kwargs.get('vault_name', None) + self.secret_name = kwargs.get('secret_name', None) + self.secret_version = kwargs.get('secret_version', None) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters_py3.py new file mode 100644 index 000000000000..207415c27bd8 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/key_vault_certificate_source_parameters_py3.py @@ -0,0 +1,84 @@ +# 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 KeyVaultCertificateSourceParameters(Model): + """Describes the parameters for using a user's KeyVault certificate for + securing custom domain. + + 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.KeyVaultCertificateSourceParameters" . + :vartype odatatype: str + :param subscription_id: Required. Subscription Id of the user's Key Vault + containing the SSL certificate + :type subscription_id: str + :param resource_group_name: Required. Resource group of the user's Key + Vault containing the SSL certificate + :type resource_group_name: str + :param vault_name: Required. The name of the user's Key Vault containing + the SSL certificate + :type vault_name: str + :param secret_name: Required. The name of Key Vault Secret (representing + the full certificate PFX) in Key Vault. + :type secret_name: str + :param secret_version: Required. The version(GUID) of Key Vault Secret in + Key Vault. + :type secret_version: str + :ivar update_rule: Required. Describes the action that shall be taken when + the certificate is updated in Key Vault. Default value: "NoAction" . + :vartype update_rule: str + :ivar delete_rule: Required. Describes the action that shall be taken when + the certificate is removed from Key Vault. Default value: "NoAction" . + :vartype delete_rule: str + """ + + _validation = { + 'odatatype': {'required': True, 'constant': True}, + 'subscription_id': {'required': True}, + 'resource_group_name': {'required': True}, + 'vault_name': {'required': True}, + 'secret_name': {'required': True}, + 'secret_version': {'required': True}, + 'update_rule': {'required': True, 'constant': True}, + 'delete_rule': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'secret_name': {'key': 'secretName', 'type': 'str'}, + 'secret_version': {'key': 'secretVersion', 'type': 'str'}, + 'update_rule': {'key': 'updateRule', 'type': 'str'}, + 'delete_rule': {'key': 'deleteRule', 'type': 'str'}, + } + + odatatype = "#Microsoft.Azure.Cdn.Models.KeyVaultCertificateSourceParameters" + + update_rule = "NoAction" + + delete_rule = "NoAction" + + def __init__(self, *, subscription_id: str, resource_group_name: str, vault_name: str, secret_name: str, secret_version: str, **kwargs) -> None: + super(KeyVaultCertificateSourceParameters, self).__init__(**kwargs) + self.subscription_id = subscription_id + self.resource_group_name = resource_group_name + self.vault_name = vault_name + self.secret_name = secret_name + self.secret_version = secret_version diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py index 88b809ac026f..d230e2949fe8 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku.py @@ -18,7 +18,7 @@ class Sku(Model): :param name: Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - 'Standard_Akamai', 'Standard_ChinaCdn' + 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' :type name: str or ~azure.mgmt.cdn.models.SkuName """ diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py index d4471b8a4dd4..f85c50c65e00 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/sku_py3.py @@ -18,7 +18,7 @@ class Sku(Model): :param name: Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - 'Standard_Akamai', 'Standard_ChinaCdn' + 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' :type name: str or ~azure.mgmt.cdn.models.SkuName """ diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py new file mode 100644 index 000000000000..1153a4f390d3 --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .custom_domain_https_parameters import CustomDomainHttpsParameters + + +class UserManagedHttpsParameters(CustomDomainHttpsParameters): + """Defines the certificate source parameters using user's keyvault certificate + for enabling SSL. + + All required parameters must be populated in order to send to Azure. + + :param protocol_type: Required. Defines the TLS extension protocol that is + used for secure delivery. Possible values include: 'ServerNameIndication', + 'IPBased' + :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param certificate_source: Required. Constant filled by server. + :type certificate_source: str + :param certificate_source_parameters: Required. Defines the certificate + source parameters using user's keyvault certificate for enabling SSL. + :type certificate_source_parameters: + ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters + """ + + _validation = { + 'protocol_type': {'required': True}, + 'certificate_source': {'required': True}, + 'certificate_source_parameters': {'required': True}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, + 'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'KeyVaultCertificateSourceParameters'}, + } + + def __init__(self, **kwargs): + super(UserManagedHttpsParameters, self).__init__(**kwargs) + self.certificate_source_parameters = kwargs.get('certificate_source_parameters', None) + self.certificate_source = 'AzureKeyVault' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py b/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py new file mode 100644 index 000000000000..7a87fe51b92c --- /dev/null +++ b/azure-mgmt-cdn/azure/mgmt/cdn/models/user_managed_https_parameters_py3.py @@ -0,0 +1,48 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters + + +class UserManagedHttpsParameters(CustomDomainHttpsParameters): + """Defines the certificate source parameters using user's keyvault certificate + for enabling SSL. + + All required parameters must be populated in order to send to Azure. + + :param protocol_type: Required. Defines the TLS extension protocol that is + used for secure delivery. Possible values include: 'ServerNameIndication', + 'IPBased' + :type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType + :param certificate_source: Required. Constant filled by server. + :type certificate_source: str + :param certificate_source_parameters: Required. Defines the certificate + source parameters using user's keyvault certificate for enabling SSL. + :type certificate_source_parameters: + ~azure.mgmt.cdn.models.KeyVaultCertificateSourceParameters + """ + + _validation = { + 'protocol_type': {'required': True}, + 'certificate_source': {'required': True}, + 'certificate_source_parameters': {'required': True}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + '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) + self.certificate_source_parameters = certificate_source_parameters + self.certificate_source = 'AzureKeyVault' diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py index 581915ce50cf..554289209e1c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/custom_domains_operations.py @@ -85,7 +85,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -94,9 +94,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -116,7 +115,7 @@ def internal_paging(next_link=None, raw=False): def get( self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): - """Gets an exisitng custom domain within an endpoint. + """Gets an existing custom domain within an endpoint. :param resource_group_name: Name of the Resource group within the Azure subscription. @@ -158,7 +157,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -167,8 +166,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -207,6 +206,7 @@ def _create_initial( # 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()) @@ -219,9 +219,8 @@ def _create_initial( body_content = self._serialize.body(custom_domain_properties, 'CustomDomainParameters') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -323,7 +322,7 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -332,8 +331,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204]: raise models.ErrorResponseException(self._deserialize, response) @@ -451,7 +450,7 @@ def disable_custom_https( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -460,8 +459,8 @@ def disable_custom_https( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) @@ -479,7 +478,7 @@ def disable_custom_https( disable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} def enable_custom_https( - self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, profile_name, endpoint_name, custom_domain_name, custom_domain_https_parameters=None, custom_headers=None, raw=False, **operation_config): """Enable https delivery of the custom domain. :param resource_group_name: Name of the Resource group within the @@ -494,6 +493,12 @@ def enable_custom_https( :param custom_domain_name: Name of the custom domain within an endpoint. :type custom_domain_name: str + :param custom_domain_https_parameters: The configuration specifying + how to enable HTTPS for the custom domain - using CDN managed + certificate or user's own certificate. If not specified, enabling ssl + uses CDN managed certificate by default. + :type custom_domain_https_parameters: + ~azure.mgmt.cdn.models.CustomDomainHttpsParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -522,6 +527,7 @@ def enable_custom_https( # 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()) @@ -530,9 +536,15 @@ def enable_custom_https( 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 + if custom_domain_https_parameters is not None: + body_content = self._serialize.body(custom_domain_https_parameters, 'CustomDomainHttpsParameters') + else: + body_content = None + # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py index 3d788cd2ce9f..cc5d5a8bf537 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/edge_nodes_operations.py @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py index a363d2214d40..a0f80db8237c 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/endpoints_operations.py @@ -81,7 +81,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -90,9 +90,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -151,7 +150,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -160,8 +159,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -197,6 +196,7 @@ def _create_initial( # 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()) @@ -209,9 +209,8 @@ def _create_initial( body_content = self._serialize.body(endpoint, 'Endpoint') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -308,6 +307,7 @@ def _update_initial( # 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()) @@ -320,9 +320,8 @@ def _update_initial( body_content = self._serialize.body(endpoint_update_properties, 'EndpointUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -421,7 +420,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -430,8 +428,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -508,7 +506,7 @@ def _start_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -517,8 +515,8 @@ def _start_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) @@ -609,7 +607,7 @@ def _stop_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -618,8 +616,8 @@ def _stop_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) @@ -724,9 +722,8 @@ def _purge_content_initial( body_content = self._serialize.body(content_file_paths, 'PurgeParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(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) @@ -820,9 +817,8 @@ def _load_content_initial( body_content = self._serialize.body(content_file_paths, 'LoadParameters') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(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) @@ -929,6 +925,7 @@ def validate_custom_domain( # 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()) @@ -941,9 +938,8 @@ def validate_custom_domain( body_content = self._serialize.body(custom_domain_properties, 'ValidateCustomDomainInput') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) @@ -1008,7 +1004,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -1017,9 +1013,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py index 07eb4c2795ff..6df470f3e38b 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/operations.py @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +76,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py index e5a715ddacb5..d523c944afb1 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/origins_operations.py @@ -85,7 +85,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -94,9 +94,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -158,7 +157,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -167,8 +166,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -205,6 +204,7 @@ def _update_initial( # 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()) @@ -217,9 +217,8 @@ def _update_initial( body_content = self._serialize.body(origin_update_properties, 'OriginUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py index 438a69a9347d..7a90cfb55deb 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/profiles_operations.py @@ -73,7 +73,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -82,9 +82,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -141,7 +140,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -150,9 +149,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + 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) @@ -207,7 +205,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -216,8 +214,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -252,6 +250,7 @@ def _create_initial( # 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()) @@ -264,9 +263,8 @@ def _create_initial( body_content = self._serialize.body(profile, 'Profile') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -360,6 +358,7 @@ def _update_initial( # 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()) @@ -372,9 +371,8 @@ def _update_initial( body_content = self._serialize.body(profile_update_parameters, 'ProfileUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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) @@ -464,7 +462,6 @@ def _delete_initial( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -473,8 +470,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + 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) @@ -532,7 +529,7 @@ def get_long_running_output(response): def generate_sso_uri( self, resource_group_name, profile_name, custom_headers=None, raw=False, **operation_config): """Generates a dynamic SSO URI used to sign in to the CDN supplemental - portal. Supplemnetal portal is used to configure advanced feature + portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO @@ -570,7 +567,7 @@ def generate_sso_uri( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -579,8 +576,8 @@ def generate_sso_uri( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(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) @@ -636,7 +633,7 @@ def list_supported_optimization_types( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -645,8 +642,8 @@ def list_supported_optimization_types( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(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) @@ -707,7 +704,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -716,9 +713,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py index 57aaa52c4506..12c58aea0d1f 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/operations/resource_usage_operations.py @@ -72,7 +72,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -81,9 +81,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(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) diff --git a/azure-mgmt-cdn/azure/mgmt/cdn/version.py b/azure-mgmt-cdn/azure/mgmt/cdn/version.py index 7f225c6aab41..9797f3dd0011 100644 --- a/azure-mgmt-cdn/azure/mgmt/cdn/version.py +++ b/azure-mgmt-cdn/azure/mgmt/cdn/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.0.0" +VERSION = "3.1.0" diff --git a/azure-mgmt-cdn/build.json b/azure-mgmt-cdn/build.json deleted file mode 100644 index d5356f60b700..000000000000 --- a/azure-mgmt-cdn/build.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "autorest": [ - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", - "engines": { - "node": ">=7.10.0" - }, - "dependencies": {}, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", - "@types/commonmark": "^0.27.0", - "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", - "@types/source-map": "^0.5.0", - "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.0.21", - "dependencies": { - "dotnet-2.0.0": "^1.3.2" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.1.1", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.0.21", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - }, - { - "resolvedInfo": null, - "packageMetadata": { - "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", - "dependencies": { - "dotnet-2.0.0": "^1.4.4" - }, - "optionalDependencies": {}, - "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", - "coffee-script": "^1.11.1", - "dotnet-sdk-2.0.0": "^1.4.4", - "gulp": "^3.9.1", - "gulp-filter": "^5.0.0", - "gulp-line-ending-corrector": "^1.0.1", - "iced-coffee-script": "^108.0.11", - "marked": "^0.3.6", - "marked-terminal": "^2.0.0", - "moment": "^2.17.1", - "run-sequence": "*", - "shx": "^0.2.2", - "through2-parallel": "^0.1.3", - "yargs": "^8.0.2", - "yarn": "^1.0.2" - }, - "bundleDependencies": false, - "peerDependencies": {}, - "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", - "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.19", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_requested": { - "type": "directory", - "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" - }, - "extensionManager": { - "installationPath": "/root/.autorest", - "dotnetPath": "/root/.dotnet" - }, - "installationPath": "/root/.autorest" - } - ], - "autorest_bootstrap": {} -} \ No newline at end of file