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,7 +20,6 @@
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 @@ -72,8 +71,6 @@ 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 @@ -98,7 +95,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-12-31'
self.api_version = '2019-04-15'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -108,8 +105,6 @@ 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
37 changes: 3 additions & 34 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,11 +16,6 @@
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 @@ -71,11 +66,9 @@
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_https_parameters_py3 import CustomDomainHttpsParameters
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
Expand Down Expand Up @@ -103,11 +96,6 @@
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 @@ -158,11 +146,9 @@
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_https_parameters import CustomDomainHttpsParameters
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
Expand All @@ -187,17 +173,13 @@
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 @@ -218,7 +200,6 @@
CacheBehavior,
QueryStringBehavior,
OriginResourceState,
OriginGroupResourceState,
CustomDomainResourceState,
CustomHttpsProvisioningState,
CustomHttpsProvisioningSubstate,
Expand All @@ -235,11 +216,6 @@
'SsoUri',
'SupportedOptimizationTypesListResult',
'DeepCreatedOrigin',
'HealthProbeParameters',
'ResourceReference',
'HttpErrorRangeParameters',
'ResponseBasedOriginErrorDetectionParameters',
'DeepCreatedOriginGroup',
'Endpoint',
'GeoFilter',
'DeliveryRuleCondition',
Expand Down Expand Up @@ -290,11 +266,9 @@
'LoadParameters',
'Origin',
'OriginUpdateParameters',
'OriginGroup',
'OriginGroupUpdateParameters',
'CustomDomainHttpsParameters',
'CustomDomain',
'CustomDomainParameters',
'CustomDomainHttpsParameters',
'CdnCertificateSourceParameters',
'CdnManagedHttpsParameters',
'KeyVaultCertificateSourceParameters',
Expand All @@ -319,16 +293,12 @@
'ResourceUsagePaged',
'EndpointPaged',
'OriginPaged',
'OriginGroupPaged',
'CustomDomainPaged',
'OperationPaged',
'EdgeNodePaged',
'SkuName',
'ProfileResourceState',
'OptimizationType',
'HealthProbeRequestType',
'ProbeProtocol',
'ResponseBasedDetectedErrorTypes',
'EndpointResourceState',
'QueryStringCachingBehavior',
'GeoFilterActions',
Expand All @@ -349,7 +319,6 @@
'CacheBehavior',
'QueryStringBehavior',
'OriginResourceState',
'OriginGroupResourceState',
'CustomDomainResourceState',
'CustomHttpsProvisioningState',
'CustomHttpsProvisioningSubstate',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,6 @@ 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 @@ -260,13 +239,6 @@ class OriginResourceState(str, Enum):
deleting = "Deleting"


class OriginGroupResourceState(str, Enum):

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


class CustomDomainResourceState(str, Enum):

creating = "Creating"
Expand Down
6 changes: 6 additions & 0 deletions sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/custom_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class CustomDomain(ProxyResource):
'CertificateDeleted'
:vartype custom_https_provisioning_substate: str or
~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate
:param custom_https_parameters: Certificate parameters for securing custom
HTTPS
:type custom_https_parameters:
~azure.mgmt.cdn.models.CustomDomainHttpsParameters
:param validation_data: Special validation or data may be required when
delivering CDN to some regions due to local compliance reasons. E.g. ICP
license number of a custom domain is required to deliver content in China.
Expand Down Expand Up @@ -77,6 +81,7 @@ class CustomDomain(ProxyResource):
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'},
'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'},
'custom_https_parameters': {'key': 'properties.customHttpsParameters', 'type': 'CustomDomainHttpsParameters'},
'validation_data': {'key': 'properties.validationData', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
Expand All @@ -87,5 +92,6 @@ def __init__(self, **kwargs):
self.resource_state = None
self.custom_https_provisioning_state = None
self.custom_https_provisioning_substate = None
self.custom_https_parameters = kwargs.get('custom_https_parameters', None)
self.validation_data = kwargs.get('validation_data', None)
self.provisioning_state = None
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class CustomDomain(ProxyResource):
'CertificateDeleted'
:vartype custom_https_provisioning_substate: str or
~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate
:param custom_https_parameters: Certificate parameters for securing custom
HTTPS
:type custom_https_parameters:
~azure.mgmt.cdn.models.CustomDomainHttpsParameters
:param validation_data: Special validation or data may be required when
delivering CDN to some regions due to local compliance reasons. E.g. ICP
license number of a custom domain is required to deliver content in China.
Expand Down Expand Up @@ -77,15 +81,17 @@ class CustomDomain(ProxyResource):
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'custom_https_provisioning_state': {'key': 'properties.customHttpsProvisioningState', 'type': 'str'},
'custom_https_provisioning_substate': {'key': 'properties.customHttpsProvisioningSubstate', 'type': 'str'},
'custom_https_parameters': {'key': 'properties.customHttpsParameters', 'type': 'CustomDomainHttpsParameters'},
'validation_data': {'key': 'properties.validationData', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, *, host_name: str, validation_data: str=None, **kwargs) -> None:
def __init__(self, *, host_name: str, custom_https_parameters=None, validation_data: str=None, **kwargs) -> None:
super(CustomDomain, self).__init__(**kwargs)
self.host_name = host_name
self.resource_state = None
self.custom_https_provisioning_state = None
self.custom_https_provisioning_substate = None
self.custom_https_parameters = custom_https_parameters
self.validation_data = validation_data
self.provisioning_state = None
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,30 @@ class DeepCreatedOrigin(Model):

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

:param name: Required. Origin name which must be unique within the
endpoint.
:param name: Required. Origin name
:type name: str
:param host_name: Required. The address of the origin. It can be a domain
name, IPv4 address, or IPv6 address. This should be unique across all
origins in an endpoint.
name, IPv4 address, or IPv6 address.
: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 @@ -73,7 +49,3 @@ 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)

This file was deleted.

Loading