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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def check_front_door_name_availability(
"""
check_front_door_name_availability_input = models.CheckNameAvailabilityInput(name=name, type=type)

api_version = "2018-08-01"
api_version = "2019-04-01"

# Construct URL
url = self.check_front_door_name_availability.metadata['url']
Expand Down Expand Up @@ -216,7 +216,7 @@ def check_front_door_name_availability_with_subscription(
"""
check_front_door_name_availability_input = models.CheckNameAvailabilityInput(name=name, type=type)

api_version = "2018-08-01"
api_version = "2019-04-01"

# Construct URL
url = self.check_front_door_name_availability_with_subscription.metadata['url']
Expand Down
28 changes: 25 additions & 3 deletions azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
from .key_vault_certificate_source_parameters_vault_py3 import KeyVaultCertificateSourceParametersVault
from .custom_https_configuration_py3 import CustomHttpsConfiguration
from .frontend_endpoint_py3 import FrontendEndpoint
from .backend_pools_settings_py3 import BackendPoolsSettings
from .front_door_update_parameters_py3 import FrontDoorUpdateParameters
from .purge_parameters_py3 import PurgeParameters
from .sub_resource_py3 import SubResource
from .cache_configuration_py3 import CacheConfiguration
from .route_configuration_py3 import RouteConfiguration
from .routing_rule_update_parameters_py3 import RoutingRuleUpdateParameters
from .cache_configuration_py3 import CacheConfiguration
from .forwarding_configuration_py3 import ForwardingConfiguration
from .redirect_configuration_py3 import RedirectConfiguration
from .backend_py3 import Backend
from .load_balancing_settings_update_parameters_py3 import LoadBalancingSettingsUpdateParameters
from .health_probe_settings_update_parameters_py3 import HealthProbeSettingsUpdateParameters
Expand Down Expand Up @@ -61,11 +65,15 @@
from .key_vault_certificate_source_parameters_vault import KeyVaultCertificateSourceParametersVault
from .custom_https_configuration import CustomHttpsConfiguration
from .frontend_endpoint import FrontendEndpoint
from .backend_pools_settings import BackendPoolsSettings
from .front_door_update_parameters import FrontDoorUpdateParameters
from .purge_parameters import PurgeParameters
from .sub_resource import SubResource
from .cache_configuration import CacheConfiguration
from .route_configuration import RouteConfiguration
from .routing_rule_update_parameters import RoutingRuleUpdateParameters
from .cache_configuration import CacheConfiguration
from .forwarding_configuration import ForwardingConfiguration
from .redirect_configuration import RedirectConfiguration
from .backend import Backend
from .load_balancing_settings_update_parameters import LoadBalancingSettingsUpdateParameters
from .health_probe_settings_update_parameters import HealthProbeSettingsUpdateParameters
Expand Down Expand Up @@ -110,11 +118,16 @@
FrontDoorCertificateSource,
FrontDoorTlsProtocolType,
FrontDoorCertificateType,
EnforceCertificateNameCheckEnabledState,
FrontDoorEnabledState,
FrontDoorProtocol,
RoutingRuleEnabledState,
FrontDoorForwardingProtocol,
FrontDoorQuery,
DynamicCompressionEnabled,
FrontDoorRedirectType,
FrontDoorRedirectProtocol,
BackendEnabledState,
SessionAffinityEnabledState,
ResourceType,
Availability,
Expand All @@ -140,11 +153,15 @@
'KeyVaultCertificateSourceParametersVault',
'CustomHttpsConfiguration',
'FrontendEndpoint',
'BackendPoolsSettings',
'FrontDoorUpdateParameters',
'PurgeParameters',
'SubResource',
'CacheConfiguration',
'RouteConfiguration',
'RoutingRuleUpdateParameters',
'CacheConfiguration',
'ForwardingConfiguration',
'RedirectConfiguration',
'Backend',
'LoadBalancingSettingsUpdateParameters',
'HealthProbeSettingsUpdateParameters',
Expand Down Expand Up @@ -188,11 +205,16 @@
'FrontDoorCertificateSource',
'FrontDoorTlsProtocolType',
'FrontDoorCertificateType',
'EnforceCertificateNameCheckEnabledState',
'FrontDoorEnabledState',
'FrontDoorProtocol',
'RoutingRuleEnabledState',
'FrontDoorForwardingProtocol',
'FrontDoorQuery',
'DynamicCompressionEnabled',
'FrontDoorRedirectType',
'FrontDoorRedirectProtocol',
'BackendEnabledState',
'SessionAffinityEnabledState',
'ResourceType',
'Availability',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Backend(Model):
values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
'Disabled'
:type enabled_state: str or
~azure.mgmt.frontdoor.models.FrontDoorEnabledState
~azure.mgmt.frontdoor.models.BackendEnabledState
:param priority: Priority to use for load balancing. Higher priorities
will not be used for load balancing if any lower priority backend is
healthy.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class BackendPoolsSettings(Model):
"""Settings that apply to all backend pools.

:param enforce_certificate_name_check: Whether to enforce certificate name
check on HTTPS requests to all backend pools. No effect on non-HTTPS
requests. Possible values include: 'Enabled', 'Disabled'. Default value:
"Enabled" .
:type enforce_certificate_name_check: str or
~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState
"""

_attribute_map = {
'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'},
}

def __init__(self, **kwargs):
super(BackendPoolsSettings, self).__init__(**kwargs)
self.enforce_certificate_name_check = kwargs.get('enforce_certificate_name_check', "Enabled")
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class BackendPoolsSettings(Model):
"""Settings that apply to all backend pools.

:param enforce_certificate_name_check: Whether to enforce certificate name
check on HTTPS requests to all backend pools. No effect on non-HTTPS
requests. Possible values include: 'Enabled', 'Disabled'. Default value:
"Enabled" .
:type enforce_certificate_name_check: str or
~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState
"""

_attribute_map = {
'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'},
}

def __init__(self, *, enforce_certificate_name_check="Enabled", **kwargs) -> None:
super(BackendPoolsSettings, self).__init__(**kwargs)
self.enforce_certificate_name_check = enforce_certificate_name_check
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Backend(Model):
values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
'Disabled'
:type enabled_state: str or
~azure.mgmt.frontdoor.models.FrontDoorEnabledState
~azure.mgmt.frontdoor.models.BackendEnabledState
:param priority: Priority to use for load balancing. Higher priorities
will not be used for load balancing if any lower priority backend is
healthy.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 .route_configuration import RouteConfiguration


class ForwardingConfiguration(RouteConfiguration):
"""Describes Forwarding Route.

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

:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param custom_forwarding_path: A custom path used to rewrite resource
paths matched by this rule. Leave empty to use incoming path.
:type custom_forwarding_path: str
:param forwarding_protocol: Protocol this rule will use when forwarding
traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly',
'MatchRequest'
:type forwarding_protocol: str or
~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol
:param cache_configuration: The caching configuration associated with this
rule.
:type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration
:param backend_pool: A reference to the BackendPool which this rule routes
to.
:type backend_pool: ~azure.mgmt.frontdoor.models.SubResource
"""

_validation = {
'odatatype': {'required': True},
}

_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'},
'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'},
'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'},
'backend_pool': {'key': 'backendPool', 'type': 'SubResource'},
}

def __init__(self, **kwargs):
super(ForwardingConfiguration, self).__init__(**kwargs)
self.custom_forwarding_path = kwargs.get('custom_forwarding_path', None)
self.forwarding_protocol = kwargs.get('forwarding_protocol', None)
self.cache_configuration = kwargs.get('cache_configuration', None)
self.backend_pool = kwargs.get('backend_pool', None)
self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration'
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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 .route_configuration_py3 import RouteConfiguration


class ForwardingConfiguration(RouteConfiguration):
"""Describes Forwarding Route.

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

:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param custom_forwarding_path: A custom path used to rewrite resource
paths matched by this rule. Leave empty to use incoming path.
:type custom_forwarding_path: str
:param forwarding_protocol: Protocol this rule will use when forwarding
traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly',
'MatchRequest'
:type forwarding_protocol: str or
~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol
:param cache_configuration: The caching configuration associated with this
rule.
:type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration
:param backend_pool: A reference to the BackendPool which this rule routes
to.
:type backend_pool: ~azure.mgmt.frontdoor.models.SubResource
"""

_validation = {
'odatatype': {'required': True},
}

_attribute_map = {
'odatatype': {'key': '@odata\\.type', 'type': 'str'},
'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'},
'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'},
'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'},
'backend_pool': {'key': 'backendPool', 'type': 'SubResource'},
}

def __init__(self, *, custom_forwarding_path: str=None, forwarding_protocol=None, cache_configuration=None, backend_pool=None, **kwargs) -> None:
super(ForwardingConfiguration, self).__init__(**kwargs)
self.custom_forwarding_path = custom_forwarding_path
self.forwarding_protocol = forwarding_protocol
self.cache_configuration = cache_configuration
self.backend_pool = backend_pool
self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration'
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ class FrontDoor(Resource):
:param frontend_endpoints: Frontend endpoints available to routing rules.
:type frontend_endpoints:
list[~azure.mgmt.frontdoor.models.FrontendEndpoint]
:param backend_pools_settings: Settings for all backendPools
:type backend_pools_settings:
~azure.mgmt.frontdoor.models.BackendPoolsSettings
:param enabled_state: Operational status of the Front Door load balancer.
Permitted values are 'Enabled' or 'Disabled'. Possible values include:
'Enabled', 'Disabled'
Expand Down Expand Up @@ -82,6 +85,7 @@ class FrontDoor(Resource):
'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': '[HealthProbeSettingsModel]'},
'backend_pools': {'key': 'properties.backendPools', 'type': '[BackendPool]'},
'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[FrontendEndpoint]'},
'backend_pools_settings': {'key': 'properties.backendPoolsSettings', 'type': 'BackendPoolsSettings'},
'enabled_state': {'key': 'properties.enabledState', 'type': 'str'},
'resource_state': {'key': 'properties.resourceState', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
Expand All @@ -96,6 +100,7 @@ def __init__(self, **kwargs):
self.health_probe_settings = kwargs.get('health_probe_settings', None)
self.backend_pools = kwargs.get('backend_pools', None)
self.frontend_endpoints = kwargs.get('frontend_endpoints', None)
self.backend_pools_settings = kwargs.get('backend_pools_settings', None)
self.enabled_state = kwargs.get('enabled_state', None)
self.resource_state = kwargs.get('resource_state', None)
self.provisioning_state = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ class FrontDoorCertificateType(str, Enum):
dedicated = "Dedicated"


class EnforceCertificateNameCheckEnabledState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class FrontDoorEnabledState(str, Enum):

enabled = "Enabled"
Expand All @@ -73,6 +79,12 @@ class FrontDoorProtocol(str, Enum):
https = "Https"


class RoutingRuleEnabledState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class FrontDoorForwardingProtocol(str, Enum):

http_only = "HttpOnly"
Expand All @@ -92,6 +104,27 @@ class DynamicCompressionEnabled(str, Enum):
disabled = "Disabled"


class FrontDoorRedirectType(str, Enum):

moved = "Moved"
found = "Found"
temporary_redirect = "TemporaryRedirect"
permanent_redirect = "PermanentRedirect"


class FrontDoorRedirectProtocol(str, Enum):

http_only = "HttpOnly"
https_only = "HttpsOnly"
match_request = "MatchRequest"


class BackendEnabledState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class SessionAffinityEnabledState(str, Enum):

enabled = "Enabled"
Expand Down
Loading