Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from .operations.profiles_operations import ProfilesOperations
from .operations.endpoints_operations import EndpointsOperations
from .operations.origins_operations import OriginsOperations
from .operations.origin_groups_operations import OriginGroupsOperations
from .operations.custom_domains_operations import CustomDomainsOperations
from .operations.resource_usage_operations import ResourceUsageOperations
from .operations.operations import Operations
Expand Down Expand Up @@ -71,6 +72,8 @@ class CdnManagementClient(SDKClient):
:vartype endpoints: azure.mgmt.cdn.operations.EndpointsOperations
:ivar origins: Origins operations
:vartype origins: azure.mgmt.cdn.operations.OriginsOperations
:ivar origin_groups: OriginGroups operations
:vartype origin_groups: azure.mgmt.cdn.operations.OriginGroupsOperations
:ivar custom_domains: CustomDomains operations
:vartype custom_domains: azure.mgmt.cdn.operations.CustomDomainsOperations
:ivar resource_usage: ResourceUsage operations
Expand All @@ -95,7 +98,7 @@ def __init__(
super(CdnManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-04-15'
self.api_version = '2019-12-31'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -105,6 +108,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.origins = OriginsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.origin_groups = OriginGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.custom_domains = CustomDomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resource_usage = ResourceUsageOperations(
Expand Down
33 changes: 33 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
from .sso_uri_py3 import SsoUri
from .supported_optimization_types_list_result_py3 import SupportedOptimizationTypesListResult
from .deep_created_origin_py3 import DeepCreatedOrigin
from .health_probe_parameters_py3 import HealthProbeParameters
from .resource_reference_py3 import ResourceReference
from .http_error_range_parameters_py3 import HttpErrorRangeParameters
from .response_based_origin_error_detection_parameters_py3 import ResponseBasedOriginErrorDetectionParameters
from .deep_created_origin_group_py3 import DeepCreatedOriginGroup
from .endpoint_py3 import Endpoint
from .geo_filter_py3 import GeoFilter
from .delivery_rule_condition_py3 import DeliveryRuleCondition
Expand Down Expand Up @@ -66,6 +71,8 @@
from .load_parameters_py3 import LoadParameters
from .origin_py3 import Origin
from .origin_update_parameters_py3 import OriginUpdateParameters
from .origin_group_py3 import OriginGroup
from .origin_group_update_parameters_py3 import OriginGroupUpdateParameters
from .custom_domain_py3 import CustomDomain
from .custom_domain_parameters_py3 import CustomDomainParameters
from .custom_domain_https_parameters_py3 import CustomDomainHttpsParameters
Expand Down Expand Up @@ -96,6 +103,11 @@
from .sso_uri import SsoUri
from .supported_optimization_types_list_result import SupportedOptimizationTypesListResult
from .deep_created_origin import DeepCreatedOrigin
from .health_probe_parameters import HealthProbeParameters
from .resource_reference import ResourceReference
from .http_error_range_parameters import HttpErrorRangeParameters
from .response_based_origin_error_detection_parameters import ResponseBasedOriginErrorDetectionParameters
from .deep_created_origin_group import DeepCreatedOriginGroup
from .endpoint import Endpoint
from .geo_filter import GeoFilter
from .delivery_rule_condition import DeliveryRuleCondition
Expand Down Expand Up @@ -146,6 +158,8 @@
from .load_parameters import LoadParameters
from .origin import Origin
from .origin_update_parameters import OriginUpdateParameters
from .origin_group import OriginGroup
from .origin_group_update_parameters import OriginGroupUpdateParameters
from .custom_domain import CustomDomain
from .custom_domain_parameters import CustomDomainParameters
from .custom_domain_https_parameters import CustomDomainHttpsParameters
Expand Down Expand Up @@ -173,13 +187,17 @@
from .resource_usage_paged import ResourceUsagePaged
from .endpoint_paged import EndpointPaged
from .origin_paged import OriginPaged
from .origin_group_paged import OriginGroupPaged
from .custom_domain_paged import CustomDomainPaged
from .operation_paged import OperationPaged
from .edge_node_paged import EdgeNodePaged
from .cdn_management_client_enums import (
SkuName,
ProfileResourceState,
OptimizationType,
HealthProbeRequestType,
ProbeProtocol,
ResponseBasedDetectedErrorTypes,
EndpointResourceState,
QueryStringCachingBehavior,
GeoFilterActions,
Expand All @@ -200,10 +218,12 @@
CacheBehavior,
QueryStringBehavior,
OriginResourceState,
OriginGroupResourceState,
CustomDomainResourceState,
CustomHttpsProvisioningState,
CustomHttpsProvisioningSubstate,
ProtocolType,
MinimumTlsVersion,
CertificateType,
ResourceType,
)
Expand All @@ -215,6 +235,11 @@
'SsoUri',
'SupportedOptimizationTypesListResult',
'DeepCreatedOrigin',
'HealthProbeParameters',
'ResourceReference',
'HttpErrorRangeParameters',
'ResponseBasedOriginErrorDetectionParameters',
'DeepCreatedOriginGroup',
'Endpoint',
'GeoFilter',
'DeliveryRuleCondition',
Expand Down Expand Up @@ -265,6 +290,8 @@
'LoadParameters',
'Origin',
'OriginUpdateParameters',
'OriginGroup',
'OriginGroupUpdateParameters',
'CustomDomain',
'CustomDomainParameters',
'CustomDomainHttpsParameters',
Expand Down Expand Up @@ -292,12 +319,16 @@
'ResourceUsagePaged',
'EndpointPaged',
'OriginPaged',
'OriginGroupPaged',
'CustomDomainPaged',
'OperationPaged',
'EdgeNodePaged',
'SkuName',
'ProfileResourceState',
'OptimizationType',
'HealthProbeRequestType',
'ProbeProtocol',
'ResponseBasedDetectedErrorTypes',
'EndpointResourceState',
'QueryStringCachingBehavior',
'GeoFilterActions',
Expand All @@ -318,10 +349,12 @@
'CacheBehavior',
'QueryStringBehavior',
'OriginResourceState',
'OriginGroupResourceState',
'CustomDomainResourceState',
'CustomHttpsProvisioningState',
'CustomHttpsProvisioningSubstate',
'ProtocolType',
'MinimumTlsVersion',
'CertificateType',
'ResourceType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters):
used for secure delivery. Possible values include: 'ServerNameIndication',
'IPBased'
:type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType
:param minimum_tls_version: TLS protocol version that will be used for
Https. Possible values include: 'None', 'TLS10', 'TLS12'
:type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion
:param certificate_source: Required. Constant filled by server.
:type certificate_source: str
:param certificate_source_parameters: Required. Defines the certificate
Expand All @@ -38,6 +41,7 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters):

_attribute_map = {
'protocol_type': {'key': 'protocolType', 'type': 'str'},
'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'},
'certificate_source': {'key': 'certificateSource', 'type': 'str'},
'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters):
used for secure delivery. Possible values include: 'ServerNameIndication',
'IPBased'
:type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType
:param minimum_tls_version: TLS protocol version that will be used for
Https. Possible values include: 'None', 'TLS10', 'TLS12'
:type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion
:param certificate_source: Required. Constant filled by server.
:type certificate_source: str
:param certificate_source_parameters: Required. Defines the certificate
Expand All @@ -38,11 +41,12 @@ class CdnManagedHttpsParameters(CustomDomainHttpsParameters):

_attribute_map = {
'protocol_type': {'key': 'protocolType', 'type': 'str'},
'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'},
'certificate_source': {'key': 'certificateSource', 'type': 'str'},
'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'CdnCertificateSourceParameters'},
}

def __init__(self, *, protocol_type, certificate_source_parameters, **kwargs) -> None:
super(CdnManagedHttpsParameters, self).__init__(protocol_type=protocol_type, **kwargs)
def __init__(self, *, protocol_type, certificate_source_parameters, minimum_tls_version=None, **kwargs) -> None:
super(CdnManagedHttpsParameters, self).__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs)
self.certificate_source_parameters = certificate_source_parameters
self.certificate_source = 'Cdn'
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@ class OptimizationType(str, Enum):
dynamic_site_acceleration = "DynamicSiteAcceleration"


class HealthProbeRequestType(str, Enum):

not_set = "NotSet"
get = "GET"
head = "HEAD"


class ProbeProtocol(str, Enum):

not_set = "NotSet"
http = "Http"
https = "Https"


class ResponseBasedDetectedErrorTypes(str, Enum):

none = "None"
tcp_errors_only = "TcpErrorsOnly"
tcp_and_http_errors = "TcpAndHttpErrors"


class EndpointResourceState(str, Enum):

creating = "Creating"
Expand Down Expand Up @@ -239,6 +260,13 @@ class OriginResourceState(str, Enum):
deleting = "Deleting"


class OriginGroupResourceState(str, Enum):

creating = "Creating"
active = "Active"
deleting = "Deleting"


class CustomDomainResourceState(str, Enum):

creating = "Creating"
Expand Down Expand Up @@ -275,6 +303,13 @@ class ProtocolType(str, Enum):
ip_based = "IPBased"


class MinimumTlsVersion(str, Enum):

none = "None"
tls10 = "TLS10"
tls12 = "TLS12"


class CertificateType(str, Enum):

shared = "Shared"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class CustomDomainHttpsParameters(Model):
used for secure delivery. Possible values include: 'ServerNameIndication',
'IPBased'
:type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType
:param minimum_tls_version: TLS protocol version that will be used for
Https. Possible values include: 'None', 'TLS10', 'TLS12'
:type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion
:param certificate_source: Required. Constant filled by server.
:type certificate_source: str
"""
Expand All @@ -35,6 +38,7 @@ class CustomDomainHttpsParameters(Model):

_attribute_map = {
'protocol_type': {'key': 'protocolType', 'type': 'str'},
'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'},
'certificate_source': {'key': 'certificateSource', 'type': 'str'},
}

Expand All @@ -45,4 +49,5 @@ class CustomDomainHttpsParameters(Model):
def __init__(self, **kwargs):
super(CustomDomainHttpsParameters, self).__init__(**kwargs)
self.protocol_type = kwargs.get('protocol_type', None)
self.minimum_tls_version = kwargs.get('minimum_tls_version', None)
self.certificate_source = None
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class CustomDomainHttpsParameters(Model):
used for secure delivery. Possible values include: 'ServerNameIndication',
'IPBased'
:type protocol_type: str or ~azure.mgmt.cdn.models.ProtocolType
:param minimum_tls_version: TLS protocol version that will be used for
Https. Possible values include: 'None', 'TLS10', 'TLS12'
:type minimum_tls_version: str or ~azure.mgmt.cdn.models.MinimumTlsVersion
:param certificate_source: Required. Constant filled by server.
:type certificate_source: str
"""
Expand All @@ -35,14 +38,16 @@ class CustomDomainHttpsParameters(Model):

_attribute_map = {
'protocol_type': {'key': 'protocolType', 'type': 'str'},
'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'},
'certificate_source': {'key': 'certificateSource', 'type': 'str'},
}

_subtype_map = {
'certificate_source': {'Cdn': 'CdnManagedHttpsParameters', 'AzureKeyVault': 'UserManagedHttpsParameters'}
}

def __init__(self, *, protocol_type, **kwargs) -> None:
def __init__(self, *, protocol_type, minimum_tls_version=None, **kwargs) -> None:
super(CustomDomainHttpsParameters, self).__init__(**kwargs)
self.protocol_type = protocol_type
self.minimum_tls_version = minimum_tls_version
self.certificate_source = None
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,54 @@ class DeepCreatedOrigin(Model):

All required parameters must be populated in order to send to Azure.

:param name: Required. Origin name
:param name: Required. Origin name which must be unique within the
endpoint.
:type name: str
:param host_name: Required. The address of the origin. It can be a domain
name, IPv4 address, or IPv6 address.
name, IPv4 address, or IPv6 address. This should be unique across all
origins in an endpoint.
:type host_name: str
:param http_port: The value of the HTTP port. Must be between 1 and 65535
:param http_port: The value of the HTTP port. Must be between 1 and 65535.
:type http_port: int
:param https_port: The value of the HTTPS port. Must be between 1 and
65535
65535.
:type https_port: int
:param origin_host_header: The host header value sent to the origin with
each request. If you leave this blank, the request hostname determines
this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud
Services require this host header value to match the origin hostname by
default.
:type origin_host_header: str
:param priority: Priority of origin in given origin group for load
balancing. Higher priorities will not be used for load balancing if any
lower priority origin is healthy.Must be between 1 and 5.
:type priority: int
:param weight: Weight of the origin in given origin group for load
balancing. Must be between 1 and 1000
:type weight: int
:param enabled: Origin is enabled for load balancing or not. By default,
origin is always enabled.
:type enabled: bool
"""

_validation = {
'name': {'required': True},
'host_name': {'required': True},
'http_port': {'maximum': 65535, 'minimum': 1},
'https_port': {'maximum': 65535, 'minimum': 1},
'priority': {'maximum': 5, 'minimum': 1},
'weight': {'maximum': 1000, 'minimum': 1},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'host_name': {'key': 'properties.hostName', 'type': 'str'},
'http_port': {'key': 'properties.httpPort', 'type': 'int'},
'https_port': {'key': 'properties.httpsPort', 'type': 'int'},
'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'},
'priority': {'key': 'properties.priority', 'type': 'int'},
'weight': {'key': 'properties.weight', 'type': 'int'},
'enabled': {'key': 'properties.enabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand All @@ -49,3 +73,7 @@ def __init__(self, **kwargs):
self.host_name = kwargs.get('host_name', None)
self.http_port = kwargs.get('http_port', None)
self.https_port = kwargs.get('https_port', None)
self.origin_host_header = kwargs.get('origin_host_header', None)
self.priority = kwargs.get('priority', None)
self.weight = kwargs.get('weight', None)
self.enabled = kwargs.get('enabled', None)
Loading