Skip to content

Commit

Permalink
[AutoPR] cdn/resource-manager (#3184)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 6, 2019
1 parent 9ff51d2 commit a53e2fa
Show file tree
Hide file tree
Showing 39 changed files with 734 additions and 388 deletions.
11 changes: 9 additions & 2 deletions azure-mgmt-cdn/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
++++++++++++++++++

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions azure-mgmt-cdn/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

19 changes: 0 additions & 19 deletions azure-mgmt-cdn/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/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
=====

Expand Down
18 changes: 9 additions & 9 deletions azure-mgmt-cdn/azure/mgmt/cdn/cdn_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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)
Expand Down Expand Up @@ -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())
Expand All @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -111,6 +121,8 @@
CustomDomainResourceState,
CustomHttpsProvisioningState,
CustomHttpsProvisioningSubstate,
ProtocolType,
CertificateType,
ResourceType,
)

Expand Down Expand Up @@ -140,6 +152,11 @@
'OriginUpdateParameters',
'CustomDomain',
'CustomDomainParameters',
'CustomDomainHttpsParameters',
'CdnCertificateSourceParameters',
'CdnManagedHttpsParameters',
'KeyVaultCertificateSourceParameters',
'UserManagedHttpsParameters',
'ValidateCustomDomainInput',
'ValidateCustomDomainOutput',
'CheckNameAvailabilityInput',
Expand Down Expand Up @@ -173,5 +190,7 @@
'CustomDomainResourceState',
'CustomHttpsProvisioningState',
'CustomHttpsProvisioningSubstate',
'ProtocolType',
'CertificateType',
'ResourceType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'
Loading

0 comments on commit a53e2fa

Please sign in to comment.