# 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
from msrest.exceptions import HttpOperationError
[docs]class CacheExpirationActionParameters(Model):
"""Defines the parameters for the cache expiration action.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters"
.
:vartype odatatype: str
:param cache_behavior: Required. Caching behavior for the requests.
Possible values include: 'BypassCache', 'Override', 'SetIfMissing'
:type cache_behavior: str or ~azure.mgmt.cdn.models.CacheBehavior
:ivar cache_type: Required. The level at which the content needs to be
cached. Default value: "All" .
:vartype cache_type: str
:param cache_duration: The duration for which the content needs to be
cached. Allowed format is [d.]hh:mm:ss
:type cache_duration: str
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'cache_behavior': {'required': True},
'cache_type': {'required': True, 'constant': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'cache_behavior': {'key': 'cacheBehavior', 'type': 'str'},
'cache_type': {'key': 'cacheType', 'type': 'str'},
'cache_duration': {'key': 'cacheDuration', 'type': 'str'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters"
cache_type = "All"
def __init__(self, *, cache_behavior, cache_duration: str=None, **kwargs) -> None:
super(CacheExpirationActionParameters, self).__init__(**kwargs)
self.cache_behavior = cache_behavior
self.cache_duration = cache_duration
[docs]class CacheKeyQueryStringActionParameters(Model):
"""Defines the parameters for the cache-key query string action.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"
.
:vartype odatatype: str
:param query_string_behavior: Required. Caching behavior for the requests.
Possible values include: 'Include', 'IncludeAll', 'Exclude', 'ExcludeAll'
:type query_string_behavior: str or
~azure.mgmt.cdn.models.QueryStringBehavior
:param query_parameters: query parameters to include or exclude (comma
separated).
:type query_parameters: str
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'query_string_behavior': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'query_string_behavior': {'key': 'queryStringBehavior', 'type': 'str'},
'query_parameters': {'key': 'queryParameters', 'type': 'str'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"
def __init__(self, *, query_string_behavior, query_parameters: str=None, **kwargs) -> None:
super(CacheKeyQueryStringActionParameters, self).__init__(**kwargs)
self.query_string_behavior = query_string_behavior
self.query_parameters = query_parameters
[docs]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
[docs]class CdnEndpoint(Model):
"""Defines the ARM Resource ID for the linked endpoints.
:param id: ARM Resource ID string.
:type id: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}
def __init__(self, *, id: str=None, **kwargs) -> None:
super(CdnEndpoint, self).__init__(**kwargs)
self.id = id
[docs]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 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
"""
_validation = {
'protocol_type': {'required': True},
'certificate_source': {'required': True},
}
_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, 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
[docs]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 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
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'},
'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, 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'
[docs]class Resource(Model):
"""The core properties of ARM resources.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(Resource, self).__init__(**kwargs)
self.id = None
self.name = None
self.type = None
[docs]class TrackedResource(Resource):
"""The resource model definition for a ARM tracked top level resource.
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 id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, *, location: str, tags=None, **kwargs) -> None:
super(TrackedResource, self).__init__(**kwargs)
self.location = location
self.tags = tags
[docs]class CdnWebApplicationFirewallPolicy(TrackedResource):
"""Defines web application firewall policy for Azure CDN.
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 id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param policy_settings: Describes policySettings for policy
:type policy_settings: ~azure.mgmt.cdn.models.PolicySettings
:param rate_limit_rules: Describes rate limit rules inside the policy.
:type rate_limit_rules: ~azure.mgmt.cdn.models.RateLimitRuleList
:param custom_rules: Describes custom rules inside the policy.
:type custom_rules: ~azure.mgmt.cdn.models.CustomRuleList
:param managed_rules: Describes managed rules inside the policy.
:type managed_rules: ~azure.mgmt.cdn.models.ManagedRuleSetList
:ivar endpoint_links: Describes Azure CDN endpoints associated with this
Web Application Firewall policy.
:vartype endpoint_links: list[~azure.mgmt.cdn.models.CdnEndpoint]
:ivar provisioning_state: Provisioning state of the
WebApplicationFirewallPolicy. Possible values include: 'Creating',
'Succeeded', 'Failed'
:vartype provisioning_state: str or
~azure.mgmt.cdn.models.ProvisioningState
:ivar resource_state: Resource status of the policy. Possible values
include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled',
'Deleting'
:vartype resource_state: str or ~azure.mgmt.cdn.models.PolicyResourceState
:param etag: Gets a unique read-only string that changes whenever the
resource is updated.
:type etag: str
:param sku: Required. The pricing tier (defines a CDN provider, feature
list and rate) of the CdnWebApplicationFirewallPolicy.
:type sku: ~azure.mgmt.cdn.models.Sku
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'endpoint_links': {'readonly': True},
'provisioning_state': {'readonly': True},
'resource_state': {'readonly': True},
'sku': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'},
'rate_limit_rules': {'key': 'properties.rateLimitRules', 'type': 'RateLimitRuleList'},
'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRuleList'},
'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSetList'},
'endpoint_links': {'key': 'properties.endpointLinks', 'type': '[CdnEndpoint]'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'Sku'},
}
def __init__(self, *, location: str, sku, tags=None, policy_settings=None, rate_limit_rules=None, custom_rules=None, managed_rules=None, etag: str=None, **kwargs) -> None:
super(CdnWebApplicationFirewallPolicy, self).__init__(location=location, tags=tags, **kwargs)
self.policy_settings = policy_settings
self.rate_limit_rules = rate_limit_rules
self.custom_rules = custom_rules
self.managed_rules = managed_rules
self.endpoint_links = None
self.provisioning_state = None
self.resource_state = None
self.etag = etag
self.sku = sku
[docs]class CdnWebApplicationFirewallPolicyPatchParameters(Model):
"""Properties required to update a CdnWebApplicationFirewallPolicy.
:param tags: CdnWebApplicationFirewallPolicy tags
:type tags: dict[str, str]
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, *, tags=None, **kwargs) -> None:
super(CdnWebApplicationFirewallPolicyPatchParameters, self).__init__(**kwargs)
self.tags = tags
[docs]class CheckNameAvailabilityOutput(Model):
"""Output of check name availability API.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar name_available: Indicates whether the name is available.
:vartype name_available: bool
:ivar reason: The reason why the name is not available.
:vartype reason: str
:ivar message: The detailed error message describing why the name is not
available.
:vartype message: str
"""
_validation = {
'name_available': {'readonly': True},
'reason': {'readonly': True},
'message': {'readonly': True},
}
_attribute_map = {
'name_available': {'key': 'nameAvailable', 'type': 'bool'},
'reason': {'key': 'reason', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(CheckNameAvailabilityOutput, self).__init__(**kwargs)
self.name_available = None
self.reason = None
self.message = None
[docs]class CidrIpAddress(Model):
"""CIDR Ip address.
: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
"""
_attribute_map = {
'base_ip_address': {'key': 'baseIpAddress', 'type': 'str'},
'prefix_length': {'key': 'prefixLength', 'type': 'int'},
}
def __init__(self, *, base_ip_address: str=None, prefix_length: int=None, **kwargs) -> None:
super(CidrIpAddress, self).__init__(**kwargs)
self.base_ip_address = base_ip_address
self.prefix_length = prefix_length
class CloudError(Model):
"""CloudError.
"""
_attribute_map = {
}
[docs]class CookiesMatchConditionParameters(Model):
"""Defines the parameters for Cookies match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters" .
:vartype odatatype: str
:param selector: Required. Name of Cookies to be matched
:type selector: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.CookiesOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'selector': {'required': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'selector': {'key': 'selector', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCookiesConditionParameters"
def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(CookiesMatchConditionParameters, self).__init__(**kwargs)
self.selector = selector
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class ProxyResource(Resource):
"""The resource model definition for a ARM proxy resource. It will have
everything other than required location and tags.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(ProxyResource, self).__init__(**kwargs)
[docs]class CustomDomain(ProxyResource):
"""Friendly domain name mapping to the endpoint hostname that the customer
provides for branding purposes, e.g. www.contoso.com.
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 id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param host_name: Required. The host name of the custom domain. Must be a
domain name.
:type host_name: str
:ivar resource_state: Resource status of the custom domain. Possible
values include: 'Creating', 'Active', 'Deleting'
:vartype resource_state: str or
~azure.mgmt.cdn.models.CustomDomainResourceState
:ivar custom_https_provisioning_state: Provisioning status of Custom Https
of the custom domain. Possible values include: 'Enabling', 'Enabled',
'Disabling', 'Disabled', 'Failed'
:vartype custom_https_provisioning_state: str or
~azure.mgmt.cdn.models.CustomHttpsProvisioningState
:ivar custom_https_provisioning_substate: Provisioning substate shows the
progress of custom HTTPS enabling/disabling process step by step. Possible
values include: 'SubmittingDomainControlValidationRequest',
'PendingDomainControlValidationREquestApproval',
'DomainControlValidationRequestApproved',
'DomainControlValidationRequestRejected',
'DomainControlValidationRequestTimedOut', 'IssuingCertificate',
'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate',
'CertificateDeleted'
:vartype custom_https_provisioning_substate: str or
~azure.mgmt.cdn.models.CustomHttpsProvisioningSubstate
: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.
:type validation_data: str
:ivar provisioning_state: Provisioning status of the custom domain.
:vartype provisioning_state: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'host_name': {'required': True},
'resource_state': {'readonly': True},
'custom_https_provisioning_state': {'readonly': True},
'custom_https_provisioning_substate': {'readonly': True},
'provisioning_state': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'host_name': {'key': 'properties.hostName', 'type': 'str'},
'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'},
'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:
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.validation_data = validation_data
self.provisioning_state = None
[docs]class CustomDomainParameters(Model):
"""The customDomain JSON object required for custom domain creation or update.
All required parameters must be populated in order to send to Azure.
:param host_name: Required. The host name of the custom domain. Must be a
domain name.
:type host_name: str
"""
_validation = {
'host_name': {'required': True},
}
_attribute_map = {
'host_name': {'key': 'properties.hostName', 'type': 'str'},
}
def __init__(self, *, host_name: str, **kwargs) -> None:
super(CustomDomainParameters, self).__init__(**kwargs)
self.host_name = host_name
[docs]class CustomRule(Model):
"""Defines the common attributes for a custom rule that can be included in a
waf policy.
All required parameters must be populated in order to send to Azure.
:param name: Required. Defines the name of the custom rule
:type name: str
:param enabled_state: Describes if the custom rule is in enabled or
disabled state. Defaults to Enabled if not specified. Possible values
include: 'Disabled', 'Enabled'
:type enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState
:param priority: Required. Defines in what order this rule be evaluated in
the overall list of custom rules
:type priority: int
:param match_conditions: Required. List of match conditions.
:type match_conditions: list[~azure.mgmt.cdn.models.MatchCondition]
:param action: Required. Describes what action to be applied when rule
matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
:type action: str or ~azure.mgmt.cdn.models.ActionType
"""
_validation = {
'name': {'required': True},
'priority': {'required': True, 'maximum': 1000, 'minimum': 0},
'match_conditions': {'required': True},
'action': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'enabled_state': {'key': 'enabledState', 'type': 'str'},
'priority': {'key': 'priority', 'type': 'int'},
'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'},
'action': {'key': 'action', 'type': 'str'},
}
def __init__(self, *, name: str, priority: int, match_conditions, action, enabled_state=None, **kwargs) -> None:
super(CustomRule, self).__init__(**kwargs)
self.name = name
self.enabled_state = enabled_state
self.priority = priority
self.match_conditions = match_conditions
self.action = action
[docs]class CustomRuleList(Model):
"""Defines contents of custom rules.
:param rules: List of rules
:type rules: list[~azure.mgmt.cdn.models.CustomRule]
"""
_attribute_map = {
'rules': {'key': 'rules', 'type': '[CustomRule]'},
}
def __init__(self, *, rules=None, **kwargs) -> None:
super(CustomRuleList, self).__init__(**kwargs)
self.rules = rules
[docs]class DeepCreatedOrigin(Model):
"""The main origin of CDN content which is added when creating a CDN endpoint.
All required parameters must be populated in order to send to Azure.
: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. This should be unique across all
origins in an endpoint.
:type host_name: str
:param http_port: The value of the HTTP port. Must be between 1 and 65535.
:type http_port: int
:param https_port: The value of the HTTPS port. Must be between 1 and
65535.
:type https_port: int
:param origin_host_header: The host header value sent to the origin with
each request. If you leave this blank, the request hostname determines
this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud
Services require this host header value to match the origin hostname by
default.
: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
:param private_link_alias: The Alias of the Private Link resource.
Populating this optional field indicates that this origin is 'Private'
:type private_link_alias: str
:param private_link_resource_id: The Resource Id of the Private Link
resource. Populating this optional field indicates that this backend is
'Private'
:type private_link_resource_id: str
:param private_link_location: The location of the Private Link resource.
Required only if 'privateLinkResourceId' is populated
:type private_link_location: str
:param private_link_approval_message: A custom message to be included in
the approval request to connect to the Private Link.
:type private_link_approval_message: str
"""
_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'},
'private_link_alias': {'key': 'properties.privateLinkAlias', 'type': 'str'},
'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'},
'private_link_location': {'key': 'properties.privateLinkLocation', 'type': 'str'},
'private_link_approval_message': {'key': 'properties.privateLinkApprovalMessage', 'type': 'str'},
}
def __init__(self, *, name: str, host_name: str, http_port: int=None, https_port: int=None, origin_host_header: str=None, priority: int=None, weight: int=None, enabled: bool=None, private_link_alias: str=None, private_link_resource_id: str=None, private_link_location: str=None, private_link_approval_message: str=None, **kwargs) -> None:
super(DeepCreatedOrigin, self).__init__(**kwargs)
self.name = name
self.host_name = host_name
self.http_port = http_port
self.https_port = https_port
self.origin_host_header = origin_host_header
self.priority = priority
self.weight = weight
self.enabled = enabled
self.private_link_alias = private_link_alias
self.private_link_resource_id = private_link_resource_id
self.private_link_location = private_link_location
self.private_link_approval_message = private_link_approval_message
[docs]class DeepCreatedOriginGroup(Model):
"""The origin group for CDN content which is added when creating a CDN
endpoint. Traffic is sent to the origins within the origin group based on
origin health.
All required parameters must be populated in order to send to Azure.
:param name: Required. Origin group name which must be unique within the
endpoint.
:type name: str
:param health_probe_settings: Health probe settings to the origin that is
used to determine the health of the origin.
:type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters
:param origins: Required. The source of the content being delivered via
CDN within given origin group.
:type origins: list[~azure.mgmt.cdn.models.ResourceReference]
:param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes:
Time in minutes to shift the traffic to the endpoint gradually when an
unhealthy endpoint comes healthy or a new endpoint is added. Default is 10
mins. This property is currently not supported.
:type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int
:param response_based_origin_error_detection_settings: The JSON object
that contains the properties to determine origin health using real
requests/responses.This property is currently not supported.
:type response_based_origin_error_detection_settings:
~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters
"""
_validation = {
'name': {'required': True},
'origins': {'required': True},
'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'},
'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'},
'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'},
'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'},
}
def __init__(self, *, name: str, origins, health_probe_settings=None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int=None, response_based_origin_error_detection_settings=None, **kwargs) -> None:
super(DeepCreatedOriginGroup, self).__init__(**kwargs)
self.name = name
self.health_probe_settings = health_probe_settings
self.origins = origins
self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = traffic_restoration_time_to_healed_or_new_endpoints_in_minutes
self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings
[docs]class DeliveryRule(Model):
"""A rule that specifies a set of actions and conditions.
All required parameters must be populated in order to send to Azure.
:param name: Name of the rule
:type name: str
:param order: Required. The order in which the rules are applied for the
endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will
be applied before a rule with a greater order. Rule with order 0 is a
special rule. It does not require any condition and actions listed in it
will always be applied.
:type order: int
:param conditions: A list of conditions that must be matched for the
actions to be executed
:type conditions: list[~azure.mgmt.cdn.models.DeliveryRuleCondition]
:param actions: Required. A list of actions that are executed when all the
conditions of a rule are satisfied.
:type actions: list[~azure.mgmt.cdn.models.DeliveryRuleAction]
"""
_validation = {
'order': {'required': True},
'actions': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'order': {'key': 'order', 'type': 'int'},
'conditions': {'key': 'conditions', 'type': '[DeliveryRuleCondition]'},
'actions': {'key': 'actions', 'type': '[DeliveryRuleAction]'},
}
def __init__(self, *, order: int, actions, name: str=None, conditions=None, **kwargs) -> None:
super(DeliveryRule, self).__init__(**kwargs)
self.name = name
self.order = order
self.conditions = conditions
self.actions = actions
[docs]class DeliveryRuleAction(Model):
"""An action for the delivery rule.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: UrlRedirectAction, UrlSigningAction, UrlRewriteAction,
DeliveryRuleRequestHeaderAction, DeliveryRuleResponseHeaderAction,
DeliveryRuleCacheExpirationAction, DeliveryRuleCacheKeyQueryStringAction
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}
_subtype_map = {
'name': {'UrlRedirect': 'UrlRedirectAction', 'UrlSigning': 'UrlSigningAction', 'UrlRewrite': 'UrlRewriteAction', 'ModifyRequestHeader': 'DeliveryRuleRequestHeaderAction', 'ModifyResponseHeader': 'DeliveryRuleResponseHeaderAction', 'CacheExpiration': 'DeliveryRuleCacheExpirationAction', 'CacheKeyQueryString': 'DeliveryRuleCacheKeyQueryStringAction'}
}
def __init__(self, **kwargs) -> None:
super(DeliveryRuleAction, self).__init__(**kwargs)
self.name = None
[docs]class DeliveryRuleCacheExpirationAction(DeliveryRuleAction):
"""Defines the cache expiration action for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters: ~azure.mgmt.cdn.models.CacheExpirationActionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'CacheExpirationActionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleCacheExpirationAction, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'CacheExpiration'
[docs]class DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleAction):
"""Defines the cache-key query string action for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters:
~azure.mgmt.cdn.models.CacheKeyQueryStringActionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'CacheKeyQueryStringActionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleCacheKeyQueryStringAction, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'CacheKeyQueryString'
[docs]class DeliveryRuleCondition(Model):
"""A condition for the delivery rule.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: DeliveryRuleRemoteAddressCondition,
DeliveryRuleRequestMethodCondition, DeliveryRuleQueryStringCondition,
DeliveryRulePostArgsCondition, DeliveryRuleRequestUriCondition,
DeliveryRuleRequestHeaderCondition, DeliveryRuleRequestBodyCondition,
DeliveryRuleRequestSchemeCondition, DeliveryRuleUrlPathCondition,
DeliveryRuleUrlFileExtensionCondition, DeliveryRuleUrlFileNameCondition,
DeliveryRuleHttpVersionCondition, DeliveryRuleCookiesCondition,
DeliveryRuleIsDeviceCondition
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
"""
_validation = {
'name': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}
_subtype_map = {
'name': {'RemoteAddress': 'DeliveryRuleRemoteAddressCondition', 'RequestMethod': 'DeliveryRuleRequestMethodCondition', 'QueryString': 'DeliveryRuleQueryStringCondition', 'PostArgs': 'DeliveryRulePostArgsCondition', 'RequestUri': 'DeliveryRuleRequestUriCondition', 'RequestHeader': 'DeliveryRuleRequestHeaderCondition', 'RequestBody': 'DeliveryRuleRequestBodyCondition', 'RequestScheme': 'DeliveryRuleRequestSchemeCondition', 'UrlPath': 'DeliveryRuleUrlPathCondition', 'UrlFileExtension': 'DeliveryRuleUrlFileExtensionCondition', 'UrlFileName': 'DeliveryRuleUrlFileNameCondition', 'HttpVersion': 'DeliveryRuleHttpVersionCondition', 'Cookies': 'DeliveryRuleCookiesCondition', 'IsDevice': 'DeliveryRuleIsDeviceCondition'}
}
def __init__(self, **kwargs) -> None:
super(DeliveryRuleCondition, self).__init__(**kwargs)
self.name = None
[docs]class DeliveryRuleCookiesCondition(DeliveryRuleCondition):
"""Defines the Cookies condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters: ~azure.mgmt.cdn.models.CookiesMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'CookiesMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleCookiesCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'Cookies'
[docs]class DeliveryRuleHttpVersionCondition(DeliveryRuleCondition):
"""Defines the HttpVersion condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.HttpVersionMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'HttpVersionMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleHttpVersionCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'HttpVersion'
[docs]class DeliveryRuleIsDeviceCondition(DeliveryRuleCondition):
"""Defines the IsDevice condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters: ~azure.mgmt.cdn.models.IsDeviceMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'IsDeviceMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleIsDeviceCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'IsDevice'
[docs]class DeliveryRulePostArgsCondition(DeliveryRuleCondition):
"""Defines the PostArgs condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters: ~azure.mgmt.cdn.models.PostArgsMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'PostArgsMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRulePostArgsCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'PostArgs'
[docs]class DeliveryRuleQueryStringCondition(DeliveryRuleCondition):
"""Defines the QueryString condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.QueryStringMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'QueryStringMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleQueryStringCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'QueryString'
[docs]class DeliveryRuleRemoteAddressCondition(DeliveryRuleCondition):
"""Defines the RemoteAddress condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.RemoteAddressMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'RemoteAddressMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleRemoteAddressCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'RemoteAddress'
[docs]class DeliveryRuleRequestBodyCondition(DeliveryRuleCondition):
"""Defines the RequestBody condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.RequestBodyMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'RequestBodyMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleRequestBodyCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'RequestBody'
[docs]class DeliveryRuleRequestMethodCondition(DeliveryRuleCondition):
"""Defines the RequestMethod condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.RequestMethodMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'RequestMethodMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleRequestMethodCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'RequestMethod'
[docs]class DeliveryRuleRequestSchemeCondition(DeliveryRuleCondition):
"""Defines the RequestScheme condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.RequestSchemeMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'RequestSchemeMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleRequestSchemeCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'RequestScheme'
[docs]class DeliveryRuleRequestUriCondition(DeliveryRuleCondition):
"""Defines the RequestUri condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.RequestUriMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'RequestUriMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleRequestUriCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'RequestUri'
[docs]class DeliveryRuleUrlFileExtensionCondition(DeliveryRuleCondition):
"""Defines the UrlFileExtension condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.UrlFileExtensionMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlFileExtensionMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleUrlFileExtensionCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlFileExtension'
[docs]class DeliveryRuleUrlFileNameCondition(DeliveryRuleCondition):
"""Defines the UrlFileName condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters:
~azure.mgmt.cdn.models.UrlFileNameMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlFileNameMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleUrlFileNameCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlFileName'
[docs]class DeliveryRuleUrlPathCondition(DeliveryRuleCondition):
"""Defines the UrlPath condition for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the condition.
:type parameters: ~azure.mgmt.cdn.models.UrlPathMatchConditionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlPathMatchConditionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(DeliveryRuleUrlPathCondition, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlPath'
[docs]class EdgeNode(ProxyResource):
"""Edgenode is a global Point of Presence (POP) location used to deliver CDN
content to end users.
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 id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param ip_address_groups: Required. List of ip address groups.
:type ip_address_groups: list[~azure.mgmt.cdn.models.IpAddressGroup]
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'ip_address_groups': {'required': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'ip_address_groups': {'key': 'properties.ipAddressGroups', 'type': '[IpAddressGroup]'},
}
def __init__(self, *, ip_address_groups, **kwargs) -> None:
super(EdgeNode, self).__init__(**kwargs)
self.ip_address_groups = ip_address_groups
[docs]class Endpoint(TrackedResource):
"""CDN endpoint is the entity within a CDN profile containing configuration
information such as origin, protocol, content caching and delivery
behavior. The CDN endpoint uses the URL format
<endpointname>.azureedge.net.
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 id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param origin_path: A directory path on the origin that CDN can use to
retrieve content from, e.g. contoso.cloudapp.net/originpath.
:type origin_path: str
:param content_types_to_compress: List of content types on which
compression applies. The value should be a valid MIME type.
:type content_types_to_compress: list[str]
:param origin_host_header: The host header value sent to the origin with
each request. This property at Endpoint is only allowed when endpoint uses
single origin and can be overridden by the same property specified at
origin.If you leave this blank, the request hostname determines this
value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud
Services require this host header value to match the origin hostname by
default.
:type origin_host_header: str
:param is_compression_enabled: Indicates whether content compression is
enabled on CDN. Default value is false. If compression is enabled, content
will be served as compressed if user requests for a compressed version.
Content won't be compressed on CDN when requested content is smaller than
1 byte or larger than 1 MB.
:type is_compression_enabled: bool
:param is_http_allowed: Indicates whether HTTP traffic is allowed on the
endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
must be allowed.
:type is_http_allowed: bool
:param is_https_allowed: Indicates whether HTTPS traffic is allowed on the
endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
must be allowed.
:type is_https_allowed: bool
:param query_string_caching_behavior: Defines how CDN caches requests that
include query strings. You can ignore any query strings when caching,
bypass caching to prevent requests that contain query strings from being
cached, or cache every request with a unique URL. Possible values include:
'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'
:type query_string_caching_behavior: str or
~azure.mgmt.cdn.models.QueryStringCachingBehavior
:param optimization_type: Specifies what scenario the customer wants this
CDN endpoint to optimize for, e.g. Download, Media services. With this
information, CDN can apply scenario driven optimization. Possible values
include: 'GeneralWebDelivery', 'GeneralMediaStreaming',
'VideoOnDemandMediaStreaming', 'LargeFileDownload',
'DynamicSiteAcceleration'
:type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType
:param probe_path: Path to a file hosted on the origin which helps
accelerate delivery of the dynamic content and calculate the most optimal
routes for the CDN. This is relative to the origin path. This property is
only relevant when using a single origin.
:type probe_path: str
:param geo_filters: List of rules defining the user's geo access within a
CDN endpoint. Each geo filter defines an access rule to a specified path
or content, e.g. block APAC for path /pictures/
:type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter]
:param default_origin_group: A reference to the origin group.
:type default_origin_group: ~azure.mgmt.cdn.models.ResourceReference
:param url_signing_keys: List of keys used to validate the signed URL
hashes.
:type url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey]
:param delivery_policy: A policy that specifies the delivery rules to be
used for an endpoint.
:type delivery_policy:
~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy
:param web_application_firewall_policy_link: Defines the Web Application
Firewall policy for the endpoint (if applicable)
:type web_application_firewall_policy_link:
~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink
:ivar host_name: The host name of the endpoint structured as
{endpointName}.{DNSZone}, e.g. contoso.azureedge.net
:vartype host_name: str
:param origins: Required. The source of the content being delivered via
CDN.
:type origins: list[~azure.mgmt.cdn.models.DeepCreatedOrigin]
:param origin_groups: The origin groups comprising of origins that are
used for load balancing the traffic based on availability.
:type origin_groups: list[~azure.mgmt.cdn.models.DeepCreatedOriginGroup]
:ivar resource_state: Resource status of the endpoint. Possible values
include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped',
'Stopping'
:vartype resource_state: str or
~azure.mgmt.cdn.models.EndpointResourceState
:ivar provisioning_state: Provisioning status of the endpoint.
:vartype provisioning_state: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'host_name': {'readonly': True},
'origins': {'required': True},
'resource_state': {'readonly': True},
'provisioning_state': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'origin_path': {'key': 'properties.originPath', 'type': 'str'},
'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'},
'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'},
'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'},
'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'},
'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'},
'query_string_caching_behavior': {'key': 'properties.queryStringCachingBehavior', 'type': 'QueryStringCachingBehavior'},
'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'},
'probe_path': {'key': 'properties.probePath', 'type': 'str'},
'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'},
'default_origin_group': {'key': 'properties.defaultOriginGroup', 'type': 'ResourceReference'},
'url_signing_keys': {'key': 'properties.urlSigningKeys', 'type': '[UrlSigningKey]'},
'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'},
'web_application_firewall_policy_link': {'key': 'properties.webApplicationFirewallPolicyLink', 'type': 'EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink'},
'host_name': {'key': 'properties.hostName', 'type': 'str'},
'origins': {'key': 'properties.origins', 'type': '[DeepCreatedOrigin]'},
'origin_groups': {'key': 'properties.originGroups', 'type': '[DeepCreatedOriginGroup]'},
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
def __init__(self, *, location: str, origins, tags=None, origin_path: str=None, content_types_to_compress=None, origin_host_header: str=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, default_origin_group=None, url_signing_keys=None, delivery_policy=None, web_application_firewall_policy_link=None, origin_groups=None, **kwargs) -> None:
super(Endpoint, self).__init__(location=location, tags=tags, **kwargs)
self.origin_path = origin_path
self.content_types_to_compress = content_types_to_compress
self.origin_host_header = origin_host_header
self.is_compression_enabled = is_compression_enabled
self.is_http_allowed = is_http_allowed
self.is_https_allowed = is_https_allowed
self.query_string_caching_behavior = query_string_caching_behavior
self.optimization_type = optimization_type
self.probe_path = probe_path
self.geo_filters = geo_filters
self.default_origin_group = default_origin_group
self.url_signing_keys = url_signing_keys
self.delivery_policy = delivery_policy
self.web_application_firewall_policy_link = web_application_firewall_policy_link
self.host_name = None
self.origins = origins
self.origin_groups = origin_groups
self.resource_state = None
self.provisioning_state = None
[docs]class EndpointPropertiesUpdateParametersDeliveryPolicy(Model):
"""A policy that specifies the delivery rules to be used for an endpoint.
All required parameters must be populated in order to send to Azure.
:param description: User-friendly description of the policy.
:type description: str
:param rules: Required. A list of the delivery rules.
:type rules: list[~azure.mgmt.cdn.models.DeliveryRule]
"""
_validation = {
'rules': {'required': True},
}
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'rules': {'key': 'rules', 'type': '[DeliveryRule]'},
}
def __init__(self, *, rules, description: str=None, **kwargs) -> None:
super(EndpointPropertiesUpdateParametersDeliveryPolicy, self).__init__(**kwargs)
self.description = description
self.rules = rules
[docs]class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(Model):
"""Defines the Web Application Firewall policy for the endpoint (if
applicable).
:param id: Resource ID.
:type id: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}
def __init__(self, *, id: str=None, **kwargs) -> None:
super(EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink, self).__init__(**kwargs)
self.id = id
[docs]class EndpointUpdateParameters(Model):
"""Properties required to create or update an endpoint.
:param tags: Endpoint tags.
:type tags: dict[str, str]
:param origin_path: A directory path on the origin that CDN can use to
retrieve content from, e.g. contoso.cloudapp.net/originpath.
:type origin_path: str
:param content_types_to_compress: List of content types on which
compression applies. The value should be a valid MIME type.
:type content_types_to_compress: list[str]
:param origin_host_header: The host header value sent to the origin with
each request. This property at Endpoint is only allowed when endpoint uses
single origin and can be overridden by the same property specified at
origin.If you leave this blank, the request hostname determines this
value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud
Services require this host header value to match the origin hostname by
default.
:type origin_host_header: str
:param is_compression_enabled: Indicates whether content compression is
enabled on CDN. Default value is false. If compression is enabled, content
will be served as compressed if user requests for a compressed version.
Content won't be compressed on CDN when requested content is smaller than
1 byte or larger than 1 MB.
:type is_compression_enabled: bool
:param is_http_allowed: Indicates whether HTTP traffic is allowed on the
endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
must be allowed.
:type is_http_allowed: bool
:param is_https_allowed: Indicates whether HTTPS traffic is allowed on the
endpoint. Default value is true. At least one protocol (HTTP or HTTPS)
must be allowed.
:type is_https_allowed: bool
:param query_string_caching_behavior: Defines how CDN caches requests that
include query strings. You can ignore any query strings when caching,
bypass caching to prevent requests that contain query strings from being
cached, or cache every request with a unique URL. Possible values include:
'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet'
:type query_string_caching_behavior: str or
~azure.mgmt.cdn.models.QueryStringCachingBehavior
:param optimization_type: Specifies what scenario the customer wants this
CDN endpoint to optimize for, e.g. Download, Media services. With this
information, CDN can apply scenario driven optimization. Possible values
include: 'GeneralWebDelivery', 'GeneralMediaStreaming',
'VideoOnDemandMediaStreaming', 'LargeFileDownload',
'DynamicSiteAcceleration'
:type optimization_type: str or ~azure.mgmt.cdn.models.OptimizationType
:param probe_path: Path to a file hosted on the origin which helps
accelerate delivery of the dynamic content and calculate the most optimal
routes for the CDN. This is relative to the origin path. This property is
only relevant when using a single origin.
:type probe_path: str
:param geo_filters: List of rules defining the user's geo access within a
CDN endpoint. Each geo filter defines an access rule to a specified path
or content, e.g. block APAC for path /pictures/
:type geo_filters: list[~azure.mgmt.cdn.models.GeoFilter]
:param default_origin_group: A reference to the origin group.
:type default_origin_group: ~azure.mgmt.cdn.models.ResourceReference
:param url_signing_keys: List of keys used to validate the signed URL
hashes.
:type url_signing_keys: list[~azure.mgmt.cdn.models.UrlSigningKey]
:param delivery_policy: A policy that specifies the delivery rules to be
used for an endpoint.
:type delivery_policy:
~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersDeliveryPolicy
:param web_application_firewall_policy_link: Defines the Web Application
Firewall policy for the endpoint (if applicable)
:type web_application_firewall_policy_link:
~azure.mgmt.cdn.models.EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'origin_path': {'key': 'properties.originPath', 'type': 'str'},
'content_types_to_compress': {'key': 'properties.contentTypesToCompress', 'type': '[str]'},
'origin_host_header': {'key': 'properties.originHostHeader', 'type': 'str'},
'is_compression_enabled': {'key': 'properties.isCompressionEnabled', 'type': 'bool'},
'is_http_allowed': {'key': 'properties.isHttpAllowed', 'type': 'bool'},
'is_https_allowed': {'key': 'properties.isHttpsAllowed', 'type': 'bool'},
'query_string_caching_behavior': {'key': 'properties.queryStringCachingBehavior', 'type': 'QueryStringCachingBehavior'},
'optimization_type': {'key': 'properties.optimizationType', 'type': 'str'},
'probe_path': {'key': 'properties.probePath', 'type': 'str'},
'geo_filters': {'key': 'properties.geoFilters', 'type': '[GeoFilter]'},
'default_origin_group': {'key': 'properties.defaultOriginGroup', 'type': 'ResourceReference'},
'url_signing_keys': {'key': 'properties.urlSigningKeys', 'type': '[UrlSigningKey]'},
'delivery_policy': {'key': 'properties.deliveryPolicy', 'type': 'EndpointPropertiesUpdateParametersDeliveryPolicy'},
'web_application_firewall_policy_link': {'key': 'properties.webApplicationFirewallPolicyLink', 'type': 'EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink'},
}
def __init__(self, *, tags=None, origin_path: str=None, content_types_to_compress=None, origin_host_header: str=None, is_compression_enabled: bool=None, is_http_allowed: bool=None, is_https_allowed: bool=None, query_string_caching_behavior=None, optimization_type=None, probe_path: str=None, geo_filters=None, default_origin_group=None, url_signing_keys=None, delivery_policy=None, web_application_firewall_policy_link=None, **kwargs) -> None:
super(EndpointUpdateParameters, self).__init__(**kwargs)
self.tags = tags
self.origin_path = origin_path
self.content_types_to_compress = content_types_to_compress
self.origin_host_header = origin_host_header
self.is_compression_enabled = is_compression_enabled
self.is_http_allowed = is_http_allowed
self.is_https_allowed = is_https_allowed
self.query_string_caching_behavior = query_string_caching_behavior
self.optimization_type = optimization_type
self.probe_path = probe_path
self.geo_filters = geo_filters
self.default_origin_group = default_origin_group
self.url_signing_keys = url_signing_keys
self.delivery_policy = delivery_policy
self.web_application_firewall_policy_link = web_application_firewall_policy_link
[docs]class ErrorResponse(Model):
"""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
sending a request.
:ivar code: Error code.
:vartype code: str
:ivar message: Error message indicating why the operation failed.
:vartype message: str
"""
_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
}
_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(ErrorResponse, self).__init__(**kwargs)
self.code = None
self.message = None
[docs]class ErrorResponseException(HttpOperationError):
"""Server responsed with exception of type: 'ErrorResponse'.
:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""
def __init__(self, deserialize, response, *args):
super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
[docs]class GeoFilter(Model):
"""Rules defining user's geo access within a CDN endpoint.
All required parameters must be populated in order to send to Azure.
:param relative_path: Required. Relative path applicable to geo filter.
(e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.)
:type relative_path: str
:param action: Required. Action of the geo filter, i.e. allow or block
access. Possible values include: 'Block', 'Allow'
:type action: str or ~azure.mgmt.cdn.models.GeoFilterActions
:param country_codes: Required. Two letter country codes defining user
country access in a geo filter, e.g. AU, MX, US.
:type country_codes: list[str]
"""
_validation = {
'relative_path': {'required': True},
'action': {'required': True},
'country_codes': {'required': True},
}
_attribute_map = {
'relative_path': {'key': 'relativePath', 'type': 'str'},
'action': {'key': 'action', 'type': 'GeoFilterActions'},
'country_codes': {'key': 'countryCodes', 'type': '[str]'},
}
def __init__(self, *, relative_path: str, action, country_codes, **kwargs) -> None:
super(GeoFilter, self).__init__(**kwargs)
self.relative_path = relative_path
self.action = action
self.country_codes = country_codes
[docs]class HealthProbeParameters(Model):
"""The JSON object that contains the properties to send health probes to
origin.
:param probe_path: The path relative to the origin that is used to
determine the health of the origin.
:type probe_path: str
:param probe_request_type: The type of health probe request that is made.
Possible values include: 'NotSet', 'GET', 'HEAD'
:type probe_request_type: str or
~azure.mgmt.cdn.models.HealthProbeRequestType
:param probe_protocol: Protocol to use for health probe. Possible values
include: 'NotSet', 'Http', 'Https'
:type probe_protocol: str or ~azure.mgmt.cdn.models.ProbeProtocol
:param probe_interval_in_seconds: The number of seconds between health
probes.Default is 240sec.
:type probe_interval_in_seconds: int
"""
_validation = {
'probe_interval_in_seconds': {'maximum': 255, 'minimum': 1},
}
_attribute_map = {
'probe_path': {'key': 'probePath', 'type': 'str'},
'probe_request_type': {'key': 'probeRequestType', 'type': 'HealthProbeRequestType'},
'probe_protocol': {'key': 'probeProtocol', 'type': 'ProbeProtocol'},
'probe_interval_in_seconds': {'key': 'probeIntervalInSeconds', 'type': 'int'},
}
def __init__(self, *, probe_path: str=None, probe_request_type=None, probe_protocol=None, probe_interval_in_seconds: int=None, **kwargs) -> None:
super(HealthProbeParameters, self).__init__(**kwargs)
self.probe_path = probe_path
self.probe_request_type = probe_request_type
self.probe_protocol = probe_protocol
self.probe_interval_in_seconds = probe_interval_in_seconds
[docs]class HttpErrorRangeParameters(Model):
"""The JSON object that represents the range for http status codes.
:param begin: The inclusive start of the http status code range.
:type begin: int
:param end: The inclusive end of the http status code range.
:type end: int
"""
_validation = {
'begin': {'maximum': 999, 'minimum': 100},
'end': {'maximum': 999, 'minimum': 100},
}
_attribute_map = {
'begin': {'key': 'begin', 'type': 'int'},
'end': {'key': 'end', 'type': 'int'},
}
def __init__(self, *, begin: int=None, end: int=None, **kwargs) -> None:
super(HttpErrorRangeParameters, self).__init__(**kwargs)
self.begin = begin
self.end = end
[docs]class HttpVersionMatchConditionParameters(Model):
"""Defines the parameters for HttpVersion match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters" .
:vartype odatatype: str
:ivar operator: Required. Describes operator to be matched. Default value:
"Equal" .
:vartype operator: str
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True, 'constant': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHttpVersionConditionParameters"
operator = "Equal"
def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None:
super(HttpVersionMatchConditionParameters, self).__init__(**kwargs)
self.negate_condition = negate_condition
self.match_values = match_values
[docs]class IpAddressGroup(Model):
"""CDN Ip address group.
:param delivery_region: The delivery region of the ip address group
:type delivery_region: str
:param ipv4_addresses: The list of ip v4 addresses.
:type ipv4_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress]
:param ipv6_addresses: The list of ip v6 addresses.
:type ipv6_addresses: list[~azure.mgmt.cdn.models.CidrIpAddress]
"""
_attribute_map = {
'delivery_region': {'key': 'deliveryRegion', 'type': 'str'},
'ipv4_addresses': {'key': 'ipv4Addresses', 'type': '[CidrIpAddress]'},
'ipv6_addresses': {'key': 'ipv6Addresses', 'type': '[CidrIpAddress]'},
}
def __init__(self, *, delivery_region: str=None, ipv4_addresses=None, ipv6_addresses=None, **kwargs) -> None:
super(IpAddressGroup, self).__init__(**kwargs)
self.delivery_region = delivery_region
self.ipv4_addresses = ipv4_addresses
self.ipv6_addresses = ipv6_addresses
[docs]class IsDeviceMatchConditionParameters(Model):
"""Defines the parameters for IsDevice match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters" .
:vartype odatatype: str
:ivar operator: Required. Describes operator to be matched. Default value:
"Equal" .
:vartype operator: str
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True, 'constant': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleIsDeviceConditionParameters"
operator = "Equal"
def __init__(self, *, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(IsDeviceMatchConditionParameters, self).__init__(**kwargs)
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]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
[docs]class KeyVaultSigningKeyParameters(Model):
"""Describes the parameters for using a user's KeyVault for URL Signing Key.
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.KeyVaultSigningKeyParameters" .
:vartype odatatype: str
:param subscription_id: Required. Subscription Id of the user's Key Vault
containing the secret
:type subscription_id: str
:param resource_group_name: Required. Resource group of the user's Key
Vault containing the secret
:type resource_group_name: str
:param vault_name: Required. The name of the user's Key Vault containing
the secret
:type vault_name: str
:param secret_name: Required. The name of secret in Key Vault.
:type secret_name: str
:param secret_version: Required. The version(GUID) of secret in Key Vault.
:type secret_version: 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},
}
_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'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.KeyVaultSigningKeyParameters"
def __init__(self, *, subscription_id: str, resource_group_name: str, vault_name: str, secret_name: str, secret_version: str, **kwargs) -> None:
super(KeyVaultSigningKeyParameters, 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
[docs]class LoadParameters(Model):
"""Parameters required for content load.
All required parameters must be populated in order to send to Azure.
:param content_paths: Required. The path to the content to be loaded. Path
should be a relative file URL of the origin.
:type content_paths: list[str]
"""
_validation = {
'content_paths': {'required': True},
}
_attribute_map = {
'content_paths': {'key': 'contentPaths', 'type': '[str]'},
}
def __init__(self, *, content_paths, **kwargs) -> None:
super(LoadParameters, self).__init__(**kwargs)
self.content_paths = content_paths
[docs]class ManagedRuleDefinition(Model):
"""Describes a managed rule definition.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar rule_id: Identifier for the managed rule.
:vartype rule_id: str
:ivar description: Describes the functionality of the managed rule.
:vartype description: str
"""
_validation = {
'rule_id': {'readonly': True},
'description': {'readonly': True},
}
_attribute_map = {
'rule_id': {'key': 'ruleId', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(ManagedRuleDefinition, self).__init__(**kwargs)
self.rule_id = None
self.description = None
[docs]class ManagedRuleGroupDefinition(Model):
"""Describes a managed rule group.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar rule_group_name: Name of the managed rule group.
:vartype rule_group_name: str
:ivar description: Description of the managed rule group.
:vartype description: str
:ivar rules: List of rules within the managed rule group.
:vartype rules: list[~azure.mgmt.cdn.models.ManagedRuleDefinition]
"""
_validation = {
'rule_group_name': {'readonly': True},
'description': {'readonly': True},
'rules': {'readonly': True},
}
_attribute_map = {
'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'rules': {'key': 'rules', 'type': '[ManagedRuleDefinition]'},
}
def __init__(self, **kwargs) -> None:
super(ManagedRuleGroupDefinition, self).__init__(**kwargs)
self.rule_group_name = None
self.description = None
self.rules = None
[docs]class ManagedRuleGroupOverride(Model):
"""Defines a managed rule group override setting.
All required parameters must be populated in order to send to Azure.
:param rule_group_name: Required. Describes the managed rule group within
the rule set to override
:type rule_group_name: str
:param rules: List of rules that will be disabled. If none specified, all
rules in the group will be disabled.
:type rules: list[~azure.mgmt.cdn.models.ManagedRuleOverride]
"""
_validation = {
'rule_group_name': {'required': True},
}
_attribute_map = {
'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'},
'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'},
}
def __init__(self, *, rule_group_name: str, rules=None, **kwargs) -> None:
super(ManagedRuleGroupOverride, self).__init__(**kwargs)
self.rule_group_name = rule_group_name
self.rules = rules
[docs]class ManagedRuleOverride(Model):
"""Defines a managed rule group override setting.
All required parameters must be populated in order to send to Azure.
:param rule_id: Required. Identifier for the managed rule.
:type rule_id: str
:param enabled_state: Describes if the managed rule is in enabled or
disabled state. Defaults to Disabled if not specified. Possible values
include: 'Disabled', 'Enabled'
:type enabled_state: str or ~azure.mgmt.cdn.models.ManagedRuleEnabledState
:param action: Describes the override action to be applied when rule
matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
:type action: str or ~azure.mgmt.cdn.models.ActionType
"""
_validation = {
'rule_id': {'required': True},
}
_attribute_map = {
'rule_id': {'key': 'ruleId', 'type': 'str'},
'enabled_state': {'key': 'enabledState', 'type': 'str'},
'action': {'key': 'action', 'type': 'str'},
}
def __init__(self, *, rule_id: str, enabled_state=None, action=None, **kwargs) -> None:
super(ManagedRuleOverride, self).__init__(**kwargs)
self.rule_id = rule_id
self.enabled_state = enabled_state
self.action = action
[docs]class ManagedRuleSet(Model):
"""Defines a managed rule set.
All required parameters must be populated in order to send to Azure.
:param rule_set_type: Required. Defines the rule set type to use.
:type rule_set_type: str
:param rule_set_version: Required. Defines the version of the rule set to
use.
:type rule_set_version: str
:param anomaly_score: Verizon only : If the rule set supports anomaly
detection mode, this describes the threshold for blocking requests.
:type anomaly_score: int
:param rule_group_overrides: Defines the rule overrides to apply to the
rule set.
:type rule_group_overrides:
list[~azure.mgmt.cdn.models.ManagedRuleGroupOverride]
"""
_validation = {
'rule_set_type': {'required': True},
'rule_set_version': {'required': True},
'anomaly_score': {'maximum': 20, 'minimum': 0},
}
_attribute_map = {
'rule_set_type': {'key': 'ruleSetType', 'type': 'str'},
'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'},
'anomaly_score': {'key': 'anomalyScore', 'type': 'int'},
'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'},
}
def __init__(self, *, rule_set_type: str, rule_set_version: str, anomaly_score: int=None, rule_group_overrides=None, **kwargs) -> None:
super(ManagedRuleSet, self).__init__(**kwargs)
self.rule_set_type = rule_set_type
self.rule_set_version = rule_set_version
self.anomaly_score = anomaly_score
self.rule_group_overrides = rule_group_overrides
[docs]class ManagedRuleSetDefinition(Resource):
"""Describes a managed rule set definition.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar provisioning_state: Provisioning state of the managed rule set.
:vartype provisioning_state: str
:ivar rule_set_type: Type of the managed rule set.
:vartype rule_set_type: str
:ivar rule_set_version: Version of the managed rule set type.
:vartype rule_set_version: str
:ivar rule_groups: Rule groups of the managed rule set.
:vartype rule_groups:
list[~azure.mgmt.cdn.models.ManagedRuleGroupDefinition]
:param sku: The pricing tier (defines a CDN provider, feature list and
rate) of the CdnWebApplicationFirewallPolicy.
:type sku: ~azure.mgmt.cdn.models.Sku
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'provisioning_state': {'readonly': True},
'rule_set_type': {'readonly': True},
'rule_set_version': {'readonly': True},
'rule_groups': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'},
'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'},
'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ManagedRuleGroupDefinition]'},
'sku': {'key': 'sku', 'type': 'Sku'},
}
def __init__(self, *, sku=None, **kwargs) -> None:
super(ManagedRuleSetDefinition, self).__init__(**kwargs)
self.provisioning_state = None
self.rule_set_type = None
self.rule_set_version = None
self.rule_groups = None
self.sku = sku
[docs]class ManagedRuleSetList(Model):
"""Defines the list of managed rule sets for the policy.
:param managed_rule_sets: List of rule sets.
:type managed_rule_sets: list[~azure.mgmt.cdn.models.ManagedRuleSet]
"""
_attribute_map = {
'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'},
}
def __init__(self, *, managed_rule_sets=None, **kwargs) -> None:
super(ManagedRuleSetList, self).__init__(**kwargs)
self.managed_rule_sets = managed_rule_sets
[docs]class MatchCondition(Model):
"""Define match conditions.
All required parameters must be populated in order to send to Azure.
:param match_variable: Required. Match variable to compare against.
Possible values include: 'RemoteAddr', 'SocketAddr', 'RequestMethod',
'RequestHeader', 'RequestUri', 'QueryString', 'RequestBody', 'Cookies',
'PostArgs'
:type match_variable: str or ~azure.mgmt.cdn.models.MatchVariable
:param selector: Selector can used to match a specific key for
QueryString, Cookies, RequestHeader or PostArgs.
:type selector: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains',
'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual',
'BeginsWith', 'EndsWith', 'RegEx'
:type operator: str or ~azure.mgmt.cdn.models.Operator
:param negate_condition: Describes if the result of this condition should
be negated.
:type negate_condition: bool
:param match_value: Required. List of possible match values.
:type match_value: list[str]
:param transforms: List of transforms.
:type transforms: list[str or ~azure.mgmt.cdn.models.TransformType]
"""
_validation = {
'match_variable': {'required': True},
'operator': {'required': True},
'match_value': {'required': True},
}
_attribute_map = {
'match_variable': {'key': 'matchVariable', 'type': 'str'},
'selector': {'key': 'selector', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_value': {'key': 'matchValue', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
def __init__(self, *, match_variable, operator, match_value, selector: str=None, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(MatchCondition, self).__init__(**kwargs)
self.match_variable = match_variable
self.selector = selector
self.operator = operator
self.negate_condition = negate_condition
self.match_value = match_value
self.transforms = transforms
[docs]class Operation(Model):
"""CDN REST API operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar name: Operation name: {provider}/{resource}/{operation}
:vartype name: str
:param display: The object that represents the operation.
:type display: ~azure.mgmt.cdn.models.OperationDisplay
"""
_validation = {
'name': {'readonly': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}
def __init__(self, *, display=None, **kwargs) -> None:
super(Operation, self).__init__(**kwargs)
self.name = None
self.display = display
[docs]class OperationDisplay(Model):
"""The object that represents the operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar provider: Service provider: Microsoft.Cdn
:vartype provider: str
:ivar resource: Resource on which the operation is performed: Profile,
endpoint, etc.
:vartype resource: str
:ivar operation: Operation type: Read, write, delete, etc.
:vartype operation: str
"""
_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
}
_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
[docs]class Origin(ProxyResource):
"""CDN origin is the source of the content being delivered via CDN. When the
edge nodes represented by an endpoint do not have the requested content
cached, they attempt to fetch it from one or more of the configured
origins.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param host_name: The address of the origin. Domain names, IPv4 addresses,
and IPv6 addresses are supported.This should be unique across all origins
in an endpoint.
:type host_name: str
:param http_port: The value of the HTTP port. Must be between 1 and 65535.
:type http_port: int
:param https_port: The value of the HTTPS port. Must be between 1 and
65535.
:type https_port: int
:param origin_host_header: The host header value sent to the origin with
each request. If you leave this blank, the request hostname determines
this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud
Services require this host header value to match the origin hostname by
default. This overrides the host header defined at Endpoint
:type origin_host_header: str
:param priority: Priority of origin in given origin group for load
balancing. Higher priorities will not be used for load balancing if any
lower priority origin is healthy.Must be between 1 and 5
:type priority: int
:param weight: Weight of the origin in given origin group for load
balancing. Must be between 1 and 1000
:type weight: int
:param enabled: Origin is enabled for load balancing or not
:type enabled: bool
:param private_link_alias: The Alias of the Private Link resource.
Populating this optional field indicates that this origin is 'Private'
:type private_link_alias: str
:param private_link_resource_id: The Resource Id of the Private Link
resource. Populating this optional field indicates that this backend is
'Private'
:type private_link_resource_id: str
:param private_link_location: The location of the Private Link resource.
Required only if 'privateLinkResourceId' is populated
:type private_link_location: str
:param private_link_approval_message: A custom message to be included in
the approval request to connect to the Private Link.
:type private_link_approval_message: str
:ivar resource_state: Resource status of the origin. Possible values
include: 'Creating', 'Active', 'Deleting'
:vartype resource_state: str or ~azure.mgmt.cdn.models.OriginResourceState
:ivar provisioning_state: Provisioning status of the origin.
:vartype provisioning_state: str
:ivar private_endpoint_status: The approval status for the connection to
the Private Link. Possible values include: 'Pending', 'Approved',
'Rejected', 'Disconnected', 'Timeout'
:vartype private_endpoint_status: str or
~azure.mgmt.cdn.models.PrivateEndpointStatus
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'http_port': {'maximum': 65535, 'minimum': 1},
'https_port': {'maximum': 65535, 'minimum': 1},
'priority': {'maximum': 5, 'minimum': 1},
'weight': {'maximum': 1000, 'minimum': 1},
'resource_state': {'readonly': True},
'provisioning_state': {'readonly': True},
'private_endpoint_status': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', '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'},
'private_link_alias': {'key': 'properties.privateLinkAlias', 'type': 'str'},
'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'},
'private_link_location': {'key': 'properties.privateLinkLocation', 'type': 'str'},
'private_link_approval_message': {'key': 'properties.privateLinkApprovalMessage', 'type': 'str'},
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'private_endpoint_status': {'key': 'properties.privateEndpointStatus', 'type': 'str'},
}
def __init__(self, *, host_name: str=None, http_port: int=None, https_port: int=None, origin_host_header: str=None, priority: int=None, weight: int=None, enabled: bool=None, private_link_alias: str=None, private_link_resource_id: str=None, private_link_location: str=None, private_link_approval_message: str=None, **kwargs) -> None:
super(Origin, self).__init__(**kwargs)
self.host_name = host_name
self.http_port = http_port
self.https_port = https_port
self.origin_host_header = origin_host_header
self.priority = priority
self.weight = weight
self.enabled = enabled
self.private_link_alias = private_link_alias
self.private_link_resource_id = private_link_resource_id
self.private_link_location = private_link_location
self.private_link_approval_message = private_link_approval_message
self.resource_state = None
self.provisioning_state = None
self.private_endpoint_status = None
[docs]class OriginGroup(ProxyResource):
"""Origin group comprising of origins is used for load balancing to origins
when the content cannot be served from CDN.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param health_probe_settings: Health probe settings to the origin that is
used to determine the health of the origin.
:type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters
:param origins: The source of the content being delivered via CDN within
given origin group.
:type origins: list[~azure.mgmt.cdn.models.ResourceReference]
:param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes:
Time in minutes to shift the traffic to the endpoint gradually when an
unhealthy endpoint comes healthy or a new endpoint is added. Default is 10
mins. This property is currently not supported.
:type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int
:param response_based_origin_error_detection_settings: The JSON object
that contains the properties to determine origin health using real
requests/responses. This property is currently not supported.
:type response_based_origin_error_detection_settings:
~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters
:ivar resource_state: Resource status of the origin group. Possible values
include: 'Creating', 'Active', 'Deleting'
:vartype resource_state: str or
~azure.mgmt.cdn.models.OriginGroupResourceState
:ivar provisioning_state: Provisioning status of the origin group.
:vartype provisioning_state: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0},
'resource_state': {'readonly': True},
'provisioning_state': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'},
'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'},
'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'},
'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'},
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
def __init__(self, *, health_probe_settings=None, origins=None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int=None, response_based_origin_error_detection_settings=None, **kwargs) -> None:
super(OriginGroup, self).__init__(**kwargs)
self.health_probe_settings = health_probe_settings
self.origins = origins
self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = traffic_restoration_time_to_healed_or_new_endpoints_in_minutes
self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings
self.resource_state = None
self.provisioning_state = None
[docs]class OriginGroupUpdateParameters(Model):
"""Origin group properties needed for origin group creation or update.
:param health_probe_settings: Health probe settings to the origin that is
used to determine the health of the origin.
:type health_probe_settings: ~azure.mgmt.cdn.models.HealthProbeParameters
:param origins: The source of the content being delivered via CDN within
given origin group.
:type origins: list[~azure.mgmt.cdn.models.ResourceReference]
:param traffic_restoration_time_to_healed_or_new_endpoints_in_minutes:
Time in minutes to shift the traffic to the endpoint gradually when an
unhealthy endpoint comes healthy or a new endpoint is added. Default is 10
mins. This property is currently not supported.
:type traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int
:param response_based_origin_error_detection_settings: The JSON object
that contains the properties to determine origin health using real
requests/responses. This property is currently not supported.
:type response_based_origin_error_detection_settings:
~azure.mgmt.cdn.models.ResponseBasedOriginErrorDetectionParameters
"""
_validation = {
'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'maximum': 50, 'minimum': 0},
}
_attribute_map = {
'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': 'HealthProbeParameters'},
'origins': {'key': 'properties.origins', 'type': '[ResourceReference]'},
'traffic_restoration_time_to_healed_or_new_endpoints_in_minutes': {'key': 'properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes', 'type': 'int'},
'response_based_origin_error_detection_settings': {'key': 'properties.responseBasedOriginErrorDetectionSettings', 'type': 'ResponseBasedOriginErrorDetectionParameters'},
}
def __init__(self, *, health_probe_settings=None, origins=None, traffic_restoration_time_to_healed_or_new_endpoints_in_minutes: int=None, response_based_origin_error_detection_settings=None, **kwargs) -> None:
super(OriginGroupUpdateParameters, self).__init__(**kwargs)
self.health_probe_settings = health_probe_settings
self.origins = origins
self.traffic_restoration_time_to_healed_or_new_endpoints_in_minutes = traffic_restoration_time_to_healed_or_new_endpoints_in_minutes
self.response_based_origin_error_detection_settings = response_based_origin_error_detection_settings
[docs]class OriginUpdateParameters(Model):
"""Origin properties needed for origin update.
:param host_name: The address of the origin. Domain names, IPv4 addresses,
and IPv6 addresses are supported.This should be unique across all origins
in an endpoint.
:type host_name: str
:param http_port: The value of the HTTP port. Must be between 1 and 65535.
:type http_port: int
:param https_port: The value of the HTTPS port. Must be between 1 and
65535.
:type https_port: int
:param origin_host_header: The host header value sent to the origin with
each request. If you leave this blank, the request hostname determines
this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud
Services require this host header value to match the origin hostname by
default. This overrides the host header defined at Endpoint
:type origin_host_header: str
:param priority: Priority of origin in given origin group for load
balancing. Higher priorities will not be used for load balancing if any
lower priority origin is healthy.Must be between 1 and 5
:type priority: int
:param weight: Weight of the origin in given origin group for load
balancing. Must be between 1 and 1000
:type weight: int
:param enabled: Origin is enabled for load balancing or not
:type enabled: bool
:param private_link_alias: The Alias of the Private Link resource.
Populating this optional field indicates that this origin is 'Private'
:type private_link_alias: str
:param private_link_resource_id: The Resource Id of the Private Link
resource. Populating this optional field indicates that this backend is
'Private'
:type private_link_resource_id: str
:param private_link_location: The location of the Private Link resource.
Required only if 'privateLinkResourceId' is populated
:type private_link_location: str
:param private_link_approval_message: A custom message to be included in
the approval request to connect to the Private Link.
:type private_link_approval_message: str
"""
_validation = {
'http_port': {'maximum': 65535, 'minimum': 1},
'https_port': {'maximum': 65535, 'minimum': 1},
'priority': {'maximum': 5, 'minimum': 1},
'weight': {'maximum': 1000, 'minimum': 1},
}
_attribute_map = {
'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'},
'private_link_alias': {'key': 'properties.privateLinkAlias', 'type': 'str'},
'private_link_resource_id': {'key': 'properties.privateLinkResourceId', 'type': 'str'},
'private_link_location': {'key': 'properties.privateLinkLocation', 'type': 'str'},
'private_link_approval_message': {'key': 'properties.privateLinkApprovalMessage', 'type': 'str'},
}
def __init__(self, *, host_name: str=None, http_port: int=None, https_port: int=None, origin_host_header: str=None, priority: int=None, weight: int=None, enabled: bool=None, private_link_alias: str=None, private_link_resource_id: str=None, private_link_location: str=None, private_link_approval_message: str=None, **kwargs) -> None:
super(OriginUpdateParameters, self).__init__(**kwargs)
self.host_name = host_name
self.http_port = http_port
self.https_port = https_port
self.origin_host_header = origin_host_header
self.priority = priority
self.weight = weight
self.enabled = enabled
self.private_link_alias = private_link_alias
self.private_link_resource_id = private_link_resource_id
self.private_link_location = private_link_location
self.private_link_approval_message = private_link_approval_message
[docs]class PolicySettings(Model):
"""Defines contents of a web application firewall global configuration.
:param enabled_state: describes if the policy is in enabled state or
disabled state. Possible values include: 'Disabled', 'Enabled'
:type enabled_state: str or ~azure.mgmt.cdn.models.PolicyEnabledState
:param mode: Describes if it is in detection mode or prevention mode at
policy level. Possible values include: 'Prevention', 'Detection'
:type mode: str or ~azure.mgmt.cdn.models.PolicyMode
:param default_redirect_url: If action type is redirect, this field
represents the default redirect URL for the client.
:type default_redirect_url: str
:param default_custom_block_response_status_code: If the action type is
block, this field defines the default customer overridable http response
status code.
:type default_custom_block_response_status_code: int
:param default_custom_block_response_body: If the action type is block,
customer can override the response body. The body must be specified in
base64 encoding.
:type default_custom_block_response_body: str
"""
_validation = {
'default_custom_block_response_body': {'pattern': r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'},
}
_attribute_map = {
'enabled_state': {'key': 'enabledState', 'type': 'str'},
'mode': {'key': 'mode', 'type': 'str'},
'default_redirect_url': {'key': 'defaultRedirectUrl', 'type': 'str'},
'default_custom_block_response_status_code': {'key': 'defaultCustomBlockResponseStatusCode', 'type': 'int'},
'default_custom_block_response_body': {'key': 'defaultCustomBlockResponseBody', 'type': 'str'},
}
def __init__(self, *, enabled_state=None, mode=None, default_redirect_url: str=None, default_custom_block_response_status_code: int=None, default_custom_block_response_body: str=None, **kwargs) -> None:
super(PolicySettings, self).__init__(**kwargs)
self.enabled_state = enabled_state
self.mode = mode
self.default_redirect_url = default_redirect_url
self.default_custom_block_response_status_code = default_custom_block_response_status_code
self.default_custom_block_response_body = default_custom_block_response_body
[docs]class PostArgsMatchConditionParameters(Model):
"""Defines the parameters for PostArgs match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters" .
:vartype odatatype: str
:param selector: Required. Name of PostArg to be matched
:type selector: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.PostArgsOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'selector': {'required': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'selector': {'key': 'selector', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRulePostArgsConditionParameters"
def __init__(self, *, selector: str, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(PostArgsMatchConditionParameters, self).__init__(**kwargs)
self.selector = selector
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class Profile(TrackedResource):
"""CDN profile is a logical grouping of endpoints that share the same
settings, such as CDN provider and pricing tier.
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 id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Required. Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict[str, str]
:param sku: Required. The pricing tier (defines a CDN provider, feature
list and rate) of the CDN profile.
:type sku: ~azure.mgmt.cdn.models.Sku
:ivar resource_state: Resource status of the profile. Possible values
include: 'Creating', 'Active', 'Deleting', 'Disabled'
:vartype resource_state: str or
~azure.mgmt.cdn.models.ProfileResourceState
:ivar provisioning_state: Provisioning status of the profile.
:vartype provisioning_state: str
"""
_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'sku': {'required': True},
'resource_state': {'readonly': True},
'provisioning_state': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}
def __init__(self, *, location: str, sku, tags=None, **kwargs) -> None:
super(Profile, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.resource_state = None
self.provisioning_state = None
[docs]class ProfileUpdateParameters(Model):
"""Properties required to update a profile.
:param tags: Profile tags
:type tags: dict[str, str]
"""
_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
}
def __init__(self, *, tags=None, **kwargs) -> None:
super(ProfileUpdateParameters, self).__init__(**kwargs)
self.tags = tags
[docs]class PurgeParameters(Model):
"""Parameters required for content purge.
All required parameters must be populated in order to send to Azure.
:param content_paths: Required. The path to the content to be purged. Can
describe a file path or a wild card directory.
:type content_paths: list[str]
"""
_validation = {
'content_paths': {'required': True},
}
_attribute_map = {
'content_paths': {'key': 'contentPaths', 'type': '[str]'},
}
def __init__(self, *, content_paths, **kwargs) -> None:
super(PurgeParameters, self).__init__(**kwargs)
self.content_paths = content_paths
[docs]class QueryStringMatchConditionParameters(Model):
"""Defines the parameters for QueryString match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters" .
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.QueryStringOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleQueryStringConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(QueryStringMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class RateLimitRule(CustomRule):
"""Defines a rate limiting rule that can be included in a waf policy.
All required parameters must be populated in order to send to Azure.
:param name: Required. Defines the name of the custom rule
:type name: str
:param enabled_state: Describes if the custom rule is in enabled or
disabled state. Defaults to Enabled if not specified. Possible values
include: 'Disabled', 'Enabled'
:type enabled_state: str or ~azure.mgmt.cdn.models.CustomRuleEnabledState
:param priority: Required. Defines in what order this rule be evaluated in
the overall list of custom rules
:type priority: int
:param match_conditions: Required. List of match conditions.
:type match_conditions: list[~azure.mgmt.cdn.models.MatchCondition]
:param action: Required. Describes what action to be applied when rule
matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
:type action: str or ~azure.mgmt.cdn.models.ActionType
:param rate_limit_threshold: Required. Defines rate limit threshold.
:type rate_limit_threshold: int
:param rate_limit_duration_in_minutes: Required. Defines rate limit
duration. Default is 1 minute.
:type rate_limit_duration_in_minutes: int
"""
_validation = {
'name': {'required': True},
'priority': {'required': True, 'maximum': 1000, 'minimum': 0},
'match_conditions': {'required': True},
'action': {'required': True},
'rate_limit_threshold': {'required': True, 'minimum': 0},
'rate_limit_duration_in_minutes': {'required': True, 'maximum': 60, 'minimum': 0},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'enabled_state': {'key': 'enabledState', 'type': 'str'},
'priority': {'key': 'priority', 'type': 'int'},
'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'},
'action': {'key': 'action', 'type': 'str'},
'rate_limit_threshold': {'key': 'rateLimitThreshold', 'type': 'int'},
'rate_limit_duration_in_minutes': {'key': 'rateLimitDurationInMinutes', 'type': 'int'},
}
def __init__(self, *, name: str, priority: int, match_conditions, action, rate_limit_threshold: int, rate_limit_duration_in_minutes: int, enabled_state=None, **kwargs) -> None:
super(RateLimitRule, self).__init__(name=name, enabled_state=enabled_state, priority=priority, match_conditions=match_conditions, action=action, **kwargs)
self.rate_limit_threshold = rate_limit_threshold
self.rate_limit_duration_in_minutes = rate_limit_duration_in_minutes
[docs]class RateLimitRuleList(Model):
"""Defines contents of rate limit rules.
:param rules: List of rules
:type rules: list[~azure.mgmt.cdn.models.RateLimitRule]
"""
_attribute_map = {
'rules': {'key': 'rules', 'type': '[RateLimitRule]'},
}
def __init__(self, *, rules=None, **kwargs) -> None:
super(RateLimitRuleList, self).__init__(**kwargs)
self.rules = rules
[docs]class RemoteAddressMatchConditionParameters(Model):
"""Defines the parameters for RemoteAddress match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters"
.
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'IPMatch', 'GeoMatch'
:type operator: str or ~azure.mgmt.cdn.models.RemoteAddressOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. Match values to match against. The operator
will apply to each value in here with OR semantics. If any of them match
the variable with the given operator this match condition is considered a
match.
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(RemoteAddressMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class RequestBodyMatchConditionParameters(Model):
"""Defines the parameters for RequestBody match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters" .
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.RequestBodyOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestBodyConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(RequestBodyMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class RequestMethodMatchConditionParameters(Model):
"""Defines the parameters for RequestMethod match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters"
.
:vartype odatatype: str
:ivar operator: Required. Describes operator to be matched. Default value:
"Equal" .
:vartype operator: str
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True, 'constant': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestMethodConditionParameters"
operator = "Equal"
def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None:
super(RequestMethodMatchConditionParameters, self).__init__(**kwargs)
self.negate_condition = negate_condition
self.match_values = match_values
[docs]class RequestSchemeMatchConditionParameters(Model):
"""Defines the parameters for RequestScheme match conditions .
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters"
.
:vartype odatatype: str
:ivar operator: Required. Describes operator to be matched. Default value:
"Equal" .
:vartype operator: str
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True, 'constant': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestSchemeConditionParameters"
operator = "Equal"
def __init__(self, *, match_values, negate_condition: bool=None, **kwargs) -> None:
super(RequestSchemeMatchConditionParameters, self).__init__(**kwargs)
self.negate_condition = negate_condition
self.match_values = match_values
[docs]class RequestUriMatchConditionParameters(Model):
"""Defines the parameters for RequestUri match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters" .
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.RequestUriOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRequestUriConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(RequestUriMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class ResourceReference(Model):
"""Reference to another resource.
:param id: Resource ID.
:type id: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}
def __init__(self, *, id: str=None, **kwargs) -> None:
super(ResourceReference, self).__init__(**kwargs)
self.id = id
[docs]class ResourceUsage(Model):
"""Output of check resource usage API.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar resource_type: Resource type for which the usage is provided.
:vartype resource_type: str
:ivar unit: Unit of the usage. e.g. Count.
:vartype unit: str
:ivar current_value: Actual value of usage on the specified resource type.
:vartype current_value: int
:ivar limit: Quota of the specified resource type.
:vartype limit: int
"""
_validation = {
'resource_type': {'readonly': True},
'unit': {'readonly': True},
'current_value': {'readonly': True},
'limit': {'readonly': True},
}
_attribute_map = {
'resource_type': {'key': 'resourceType', 'type': 'str'},
'unit': {'key': 'unit', 'type': 'str'},
'current_value': {'key': 'currentValue', 'type': 'int'},
'limit': {'key': 'limit', 'type': 'int'},
}
def __init__(self, **kwargs) -> None:
super(ResourceUsage, self).__init__(**kwargs)
self.resource_type = None
self.unit = None
self.current_value = None
self.limit = None
[docs]class ResponseBasedOriginErrorDetectionParameters(Model):
"""The JSON object that contains the properties to determine origin health
using real requests/responses.
:param response_based_detected_error_types: Type of response errors for
real user requests for which origin will be deemed unhealthy. Possible
values include: 'None', 'TcpErrorsOnly', 'TcpAndHttpErrors'
:type response_based_detected_error_types: str or
~azure.mgmt.cdn.models.ResponseBasedDetectedErrorTypes
:param response_based_failover_threshold_percentage: The percentage of
failed requests in the sample where failover should trigger.
:type response_based_failover_threshold_percentage: int
:param http_error_ranges: The list of Http status code ranges that are
considered as server errors for origin and it is marked as unhealthy.
:type http_error_ranges:
list[~azure.mgmt.cdn.models.HttpErrorRangeParameters]
"""
_validation = {
'response_based_failover_threshold_percentage': {'maximum': 100, 'minimum': 0},
}
_attribute_map = {
'response_based_detected_error_types': {'key': 'responseBasedDetectedErrorTypes', 'type': 'ResponseBasedDetectedErrorTypes'},
'response_based_failover_threshold_percentage': {'key': 'responseBasedFailoverThresholdPercentage', 'type': 'int'},
'http_error_ranges': {'key': 'httpErrorRanges', 'type': '[HttpErrorRangeParameters]'},
}
def __init__(self, *, response_based_detected_error_types=None, response_based_failover_threshold_percentage: int=None, http_error_ranges=None, **kwargs) -> None:
super(ResponseBasedOriginErrorDetectionParameters, self).__init__(**kwargs)
self.response_based_detected_error_types = response_based_detected_error_types
self.response_based_failover_threshold_percentage = response_based_failover_threshold_percentage
self.http_error_ranges = http_error_ranges
[docs]class Sku(Model):
"""The pricing tier (defines a CDN provider, feature list and rate) of the CDN
profile.
:param name: Name of the pricing tier. Possible values include:
'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon',
'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft',
'Premium_ChinaCdn'
:type name: str or ~azure.mgmt.cdn.models.SkuName
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}
def __init__(self, *, name=None, **kwargs) -> None:
super(Sku, self).__init__(**kwargs)
self.name = name
[docs]class SsoUri(Model):
"""The URI required to login to the supplemental portal from the Azure portal.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar sso_uri_value: The URI used to login to the supplemental portal.
:vartype sso_uri_value: str
"""
_validation = {
'sso_uri_value': {'readonly': True},
}
_attribute_map = {
'sso_uri_value': {'key': 'ssoUriValue', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(SsoUri, self).__init__(**kwargs)
self.sso_uri_value = None
[docs]class SupportedOptimizationTypesListResult(Model):
"""The result of the GetSupportedOptimizationTypes API.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar supported_optimization_types: Supported optimization types for a
profile.
:vartype supported_optimization_types: list[str or
~azure.mgmt.cdn.models.OptimizationType]
"""
_validation = {
'supported_optimization_types': {'readonly': True},
}
_attribute_map = {
'supported_optimization_types': {'key': 'supportedOptimizationTypes', 'type': '[str]'},
}
def __init__(self, **kwargs) -> None:
super(SupportedOptimizationTypesListResult, self).__init__(**kwargs)
self.supported_optimization_types = None
[docs]class UrlFileExtensionMatchConditionParameters(Model):
"""Defines the parameters for UrlFileExtension match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters"
.
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.UrlFileExtensionOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionMatchConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(UrlFileExtensionMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class UrlFileNameMatchConditionParameters(Model):
"""Defines the parameters for UrlFilename match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters" .
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual'
:type operator: str or ~azure.mgmt.cdn.models.UrlFileNameOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFilenameConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(UrlFileNameMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class UrlPathMatchConditionParameters(Model):
"""Defines the parameters for UrlPath match conditions.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters"
.
:vartype odatatype: str
:param operator: Required. Describes operator to be matched. Possible
values include: 'Any', 'Equal', 'Contains', 'BeginsWith', 'EndsWith',
'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual',
'Wildcard'
:type operator: str or ~azure.mgmt.cdn.models.UrlPathOperator
:param negate_condition: Describes if this is negate condition or not
:type negate_condition: bool
:param match_values: Required. The match value for the condition of the
delivery rule
:type match_values: list[str]
:param transforms: List of transforms
:type transforms: list[str or ~azure.mgmt.cdn.models.Transform]
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'operator': {'required': True},
'match_values': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'operator': {'key': 'operator', 'type': 'str'},
'negate_condition': {'key': 'negateCondition', 'type': 'bool'},
'match_values': {'key': 'matchValues', 'type': '[str]'},
'transforms': {'key': 'transforms', 'type': '[str]'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathMatchConditionParameters"
def __init__(self, *, operator, match_values, negate_condition: bool=None, transforms=None, **kwargs) -> None:
super(UrlPathMatchConditionParameters, self).__init__(**kwargs)
self.operator = operator
self.negate_condition = negate_condition
self.match_values = match_values
self.transforms = transforms
[docs]class UrlRedirectAction(DeliveryRuleAction):
"""Defines the url redirect action for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters: ~azure.mgmt.cdn.models.UrlRedirectActionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlRedirectActionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(UrlRedirectAction, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlRedirect'
[docs]class UrlRedirectActionParameters(Model):
"""Defines the parameters for the url redirect action.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters" .
:vartype odatatype: str
:param redirect_type: Required. The redirect type the rule will use when
redirecting traffic. Possible values include: 'Moved', 'Found',
'TemporaryRedirect', 'PermanentRedirect'
:type redirect_type: str or ~azure.mgmt.cdn.models.RedirectType
:param destination_protocol: Protocol to use for the redirect. The default
value is MatchRequest. Possible values include: 'MatchRequest', 'Http',
'Https'
:type destination_protocol: str or
~azure.mgmt.cdn.models.DestinationProtocol
:param custom_path: The full path to redirect. Path cannot be empty and
must start with /. Leave empty to use the incoming path as destination
path.
:type custom_path: str
:param custom_hostname: Host to redirect. Leave empty to use the incoming
host as the destination host.
:type custom_hostname: str
:param custom_query_string: The set of query strings to be placed in the
redirect URL. Setting this value would replace any existing query string;
leave empty to preserve the incoming query string. Query string must be in
<key>=<value> format. ? and & will be added automatically so do not
include them.
:type custom_query_string: str
:param custom_fragment: Fragment to add to the redirect URL. Fragment is
the part of the URL that comes after #. Do not include the #.
:type custom_fragment: str
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'redirect_type': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'redirect_type': {'key': 'redirectType', 'type': 'str'},
'destination_protocol': {'key': 'destinationProtocol', 'type': 'str'},
'custom_path': {'key': 'customPath', 'type': 'str'},
'custom_hostname': {'key': 'customHostname', 'type': 'str'},
'custom_query_string': {'key': 'customQueryString', 'type': 'str'},
'custom_fragment': {'key': 'customFragment', 'type': 'str'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRedirectActionParameters"
def __init__(self, *, redirect_type, destination_protocol=None, custom_path: str=None, custom_hostname: str=None, custom_query_string: str=None, custom_fragment: str=None, **kwargs) -> None:
super(UrlRedirectActionParameters, self).__init__(**kwargs)
self.redirect_type = redirect_type
self.destination_protocol = destination_protocol
self.custom_path = custom_path
self.custom_hostname = custom_hostname
self.custom_query_string = custom_query_string
self.custom_fragment = custom_fragment
[docs]class UrlRewriteAction(DeliveryRuleAction):
"""Defines the url rewrite action for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters: ~azure.mgmt.cdn.models.UrlRewriteActionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlRewriteActionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(UrlRewriteAction, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlRewrite'
[docs]class UrlRewriteActionParameters(Model):
"""Defines the parameters for the url rewrite action.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:ivar odatatype: Required. Default value:
"#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters" .
:vartype odatatype: str
:param source_pattern: Required. define a request URI pattern that
identifies the type of requests that may be rewritten. If value is blank,
all strings are matched.
:type source_pattern: str
:param destination: Required. Define the relative URL to which the above
requests will be rewritten by.
:type destination: str
:param preserve_unmatched_path: Whether to preserve unmatched path.
Default value is true.
:type preserve_unmatched_path: bool
"""
_validation = {
'odatatype': {'required': True, 'constant': True},
'source_pattern': {'required': True},
'destination': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'source_pattern': {'key': 'sourcePattern', 'type': 'str'},
'destination': {'key': 'destination', 'type': 'str'},
'preserve_unmatched_path': {'key': 'preserveUnmatchedPath', 'type': 'bool'},
}
odatatype = "#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlRewriteActionParameters"
def __init__(self, *, source_pattern: str, destination: str, preserve_unmatched_path: bool=None, **kwargs) -> None:
super(UrlRewriteActionParameters, self).__init__(**kwargs)
self.source_pattern = source_pattern
self.destination = destination
self.preserve_unmatched_path = preserve_unmatched_path
[docs]class UrlSigningAction(DeliveryRuleAction):
"""Defines the url signing action for the delivery rule.
All required parameters must be populated in order to send to Azure.
:param name: Required. Constant filled by server.
:type name: str
:param parameters: Required. Defines the parameters for the action.
:type parameters: ~azure.mgmt.cdn.models.UrlSigningActionParameters
"""
_validation = {
'name': {'required': True},
'parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'UrlSigningActionParameters'},
}
def __init__(self, *, parameters, **kwargs) -> None:
super(UrlSigningAction, self).__init__(**kwargs)
self.parameters = parameters
self.name = 'UrlSigning'
[docs]class UrlSigningActionParameters(Model):
"""Defines the parameters for the Url Signing action.
All required parameters must be populated in order to send to Azure.
:param odatatype: Possible values include:
'#Microsoft.Azure.Cdn.Models.DeliveryRuleUrlSigningActionParameters'
:type odatatype: str or ~azure.mgmt.cdn.models.enum
:param key_id: Required. Id reference of the key to be used to verify the
hash and should be defined in UrlSigningKeys
:type key_id: str
:param algorithm: Algorithm to use for URL signing. Possible values
include: 'SHA256'
:type algorithm: str or ~azure.mgmt.cdn.models.Algorithm
:param parameter_name_override: Defines which query string parameters in
the url to be considered for expires, key id etc.
:type parameter_name_override:
list[~azure.mgmt.cdn.models.UrlSigningParamIdentifier]
:param ip_subnets: Match values to match against. Supports CIDR ranges
(both IPv4 and IPv6).
:type ip_subnets: list[str]
"""
_validation = {
'key_id': {'required': True},
}
_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'key_id': {'key': 'keyId', 'type': 'str'},
'algorithm': {'key': 'algorithm', 'type': 'str'},
'parameter_name_override': {'key': 'parameterNameOverride', 'type': '[UrlSigningParamIdentifier]'},
'ip_subnets': {'key': 'ipSubnets', 'type': '[str]'},
}
def __init__(self, *, key_id: str, odatatype=None, algorithm=None, parameter_name_override=None, ip_subnets=None, **kwargs) -> None:
super(UrlSigningActionParameters, self).__init__(**kwargs)
self.odatatype = odatatype
self.key_id = key_id
self.algorithm = algorithm
self.parameter_name_override = parameter_name_override
self.ip_subnets = ip_subnets
[docs]class UrlSigningKey(Model):
"""Url signing key.
All required parameters must be populated in order to send to Azure.
:param key_id: Required. Defines the customer defined key Id. This id will
exist in the incoming request to indicate the key used to form the hash.
:type key_id: str
:param key_source_parameters: Required. Defines the parameters for using
customer key vault for Url Signing Key.
:type key_source_parameters:
~azure.mgmt.cdn.models.KeyVaultSigningKeyParameters
"""
_validation = {
'key_id': {'required': True},
'key_source_parameters': {'required': True},
}
_attribute_map = {
'key_id': {'key': 'keyId', 'type': 'str'},
'key_source_parameters': {'key': 'keySourceParameters', 'type': 'KeyVaultSigningKeyParameters'},
}
def __init__(self, *, key_id: str, key_source_parameters, **kwargs) -> None:
super(UrlSigningKey, self).__init__(**kwargs)
self.key_id = key_id
self.key_source_parameters = key_source_parameters
[docs]class UrlSigningParamIdentifier(Model):
"""Defines how to identify a parameter for a specific purpose e.g. expires.
All required parameters must be populated in order to send to Azure.
:param param_indicator: Required. Indicates the purpose of the parameter.
Possible values include: 'Expires', 'KeyId', 'Signature'
:type param_indicator: str or ~azure.mgmt.cdn.models.ParamIndicator
:param param_name: Required. Parameter name
:type param_name: str
"""
_validation = {
'param_indicator': {'required': True},
'param_name': {'required': True},
}
_attribute_map = {
'param_indicator': {'key': 'paramIndicator', 'type': 'str'},
'param_name': {'key': 'paramName', 'type': 'str'},
}
def __init__(self, *, param_indicator, param_name: str, **kwargs) -> None:
super(UrlSigningParamIdentifier, self).__init__(**kwargs)
self.param_indicator = param_indicator
self.param_name = param_name
[docs]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 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
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'},
'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'MinimumTlsVersion'},
'certificate_source': {'key': 'certificateSource', 'type': 'str'},
'certificate_source_parameters': {'key': 'certificateSourceParameters', 'type': 'KeyVaultCertificateSourceParameters'},
}
def __init__(self, *, protocol_type, certificate_source_parameters, minimum_tls_version=None, **kwargs) -> None:
super(UserManagedHttpsParameters, self).__init__(protocol_type=protocol_type, minimum_tls_version=minimum_tls_version, **kwargs)
self.certificate_source_parameters = certificate_source_parameters
self.certificate_source = 'AzureKeyVault'
[docs]class ValidateCustomDomainInput(Model):
"""Input of the custom domain to be validated for DNS mapping.
All required parameters must be populated in order to send to Azure.
:param host_name: Required. The host name of the custom domain. Must be a
domain name.
:type host_name: str
"""
_validation = {
'host_name': {'required': True},
}
_attribute_map = {
'host_name': {'key': 'hostName', 'type': 'str'},
}
def __init__(self, *, host_name: str, **kwargs) -> None:
super(ValidateCustomDomainInput, self).__init__(**kwargs)
self.host_name = host_name
[docs]class ValidateCustomDomainOutput(Model):
"""Output of custom domain validation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar custom_domain_validated: Indicates whether the custom domain is
valid or not.
:vartype custom_domain_validated: bool
:ivar reason: The reason why the custom domain is not valid.
:vartype reason: str
:ivar message: Error message describing why the custom domain is not
valid.
:vartype message: str
"""
_validation = {
'custom_domain_validated': {'readonly': True},
'reason': {'readonly': True},
'message': {'readonly': True},
}
_attribute_map = {
'custom_domain_validated': {'key': 'customDomainValidated', 'type': 'bool'},
'reason': {'key': 'reason', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(ValidateCustomDomainOutput, self).__init__(**kwargs)
self.custom_domain_validated = None
self.reason = None
self.message = None
[docs]class ValidateProbeOutput(Model):
"""Output of the validate probe API.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar is_valid: Indicates whether the probe URL is accepted or not.
:vartype is_valid: bool
:ivar error_code: Specifies the error code when the probe url is not
accepted.
:vartype error_code: str
:ivar message: The detailed error message describing why the probe URL is
not accepted.
:vartype message: str
"""
_validation = {
'is_valid': {'readonly': True},
'error_code': {'readonly': True},
'message': {'readonly': True},
}
_attribute_map = {
'is_valid': {'key': 'isValid', 'type': 'bool'},
'error_code': {'key': 'errorCode', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
super(ValidateProbeOutput, self).__init__(**kwargs)
self.is_valid = None
self.error_code = None
self.message = None