diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/front_door_management_client.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/front_door_management_client.py index 2f48131d3b4d..5134686e57f2 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/front_door_management_client.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/front_door_management_client.py @@ -19,10 +19,6 @@ from msrestazure.polling.arm_polling import ARMPolling import uuid from .operations.front_doors_operations import FrontDoorsOperations -from .operations.routing_rules_operations import RoutingRulesOperations -from .operations.health_probe_settings_operations import HealthProbeSettingsOperations -from .operations.load_balancing_settings_operations import LoadBalancingSettingsOperations -from .operations.backend_pools_operations import BackendPoolsOperations from .operations.frontend_endpoints_operations import FrontendEndpointsOperations from .operations.endpoints_operations import EndpointsOperations from .operations.policies_operations import PoliciesOperations @@ -72,14 +68,6 @@ class FrontDoorManagementClient(SDKClient): :ivar front_doors: FrontDoors operations :vartype front_doors: azure.mgmt.frontdoor.operations.FrontDoorsOperations - :ivar routing_rules: RoutingRules operations - :vartype routing_rules: azure.mgmt.frontdoor.operations.RoutingRulesOperations - :ivar health_probe_settings: HealthProbeSettings operations - :vartype health_probe_settings: azure.mgmt.frontdoor.operations.HealthProbeSettingsOperations - :ivar load_balancing_settings: LoadBalancingSettings operations - :vartype load_balancing_settings: azure.mgmt.frontdoor.operations.LoadBalancingSettingsOperations - :ivar backend_pools: BackendPools operations - :vartype backend_pools: azure.mgmt.frontdoor.operations.BackendPoolsOperations :ivar frontend_endpoints: FrontendEndpoints operations :vartype frontend_endpoints: azure.mgmt.frontdoor.operations.FrontendEndpointsOperations :ivar endpoints: Endpoints operations @@ -111,14 +99,6 @@ def __init__( self.front_doors = FrontDoorsOperations( self._client, self.config, self._serialize, self._deserialize) - self.routing_rules = RoutingRulesOperations( - self._client, self.config, self._serialize, self._deserialize) - self.health_probe_settings = HealthProbeSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.load_balancing_settings = LoadBalancingSettingsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.backend_pools = BackendPoolsOperations( - self._client, self.config, self._serialize, self._deserialize) self.frontend_endpoints = FrontendEndpointsOperations( self._client, self.config, self._serialize, self._deserialize) self.endpoints = EndpointsOperations( diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/__init__.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/__init__.py index 7099b46386cc..d58a46f88073 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/__init__.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/__init__.py @@ -21,6 +21,7 @@ from .backend_pools_settings_py3 import BackendPoolsSettings from .front_door_update_parameters_py3 import FrontDoorUpdateParameters from .purge_parameters_py3 import PurgeParameters + from .routing_rule_list_result_py3 import RoutingRuleListResult from .sub_resource_py3 import SubResource from .route_configuration_py3 import RouteConfiguration from .routing_rule_update_parameters_py3 import RoutingRuleUpdateParameters @@ -28,9 +29,12 @@ from .forwarding_configuration_py3 import ForwardingConfiguration from .redirect_configuration_py3 import RedirectConfiguration from .backend_py3 import Backend + from .load_balancing_settings_list_result_py3 import LoadBalancingSettingsListResult from .load_balancing_settings_update_parameters_py3 import LoadBalancingSettingsUpdateParameters + from .health_probe_settings_list_result_py3 import HealthProbeSettingsListResult from .health_probe_settings_update_parameters_py3 import HealthProbeSettingsUpdateParameters from .backend_pool_update_parameters_py3 import BackendPoolUpdateParameters + from .backend_pool_list_result_py3 import BackendPoolListResult from .frontend_endpoint_update_parameters_web_application_firewall_policy_link_py3 import FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink from .frontend_endpoint_update_parameters_py3 import FrontendEndpointUpdateParameters from .validate_custom_domain_input_py3 import ValidateCustomDomainInput @@ -47,6 +51,7 @@ from .match_condition_py3 import MatchCondition from .custom_rule_py3 import CustomRule from .custom_rule_list_py3 import CustomRuleList + from .managed_rule_exclusion_py3 import ManagedRuleExclusion from .managed_rule_override_py3 import ManagedRuleOverride from .managed_rule_group_override_py3 import ManagedRuleGroupOverride from .managed_rule_set_py3 import ManagedRuleSet @@ -68,6 +73,7 @@ from .backend_pools_settings import BackendPoolsSettings from .front_door_update_parameters import FrontDoorUpdateParameters from .purge_parameters import PurgeParameters + from .routing_rule_list_result import RoutingRuleListResult from .sub_resource import SubResource from .route_configuration import RouteConfiguration from .routing_rule_update_parameters import RoutingRuleUpdateParameters @@ -75,9 +81,12 @@ from .forwarding_configuration import ForwardingConfiguration from .redirect_configuration import RedirectConfiguration from .backend import Backend + from .load_balancing_settings_list_result import LoadBalancingSettingsListResult from .load_balancing_settings_update_parameters import LoadBalancingSettingsUpdateParameters + from .health_probe_settings_list_result import HealthProbeSettingsListResult from .health_probe_settings_update_parameters import HealthProbeSettingsUpdateParameters from .backend_pool_update_parameters import BackendPoolUpdateParameters + from .backend_pool_list_result import BackendPoolListResult from .frontend_endpoint_update_parameters_web_application_firewall_policy_link import FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink from .frontend_endpoint_update_parameters import FrontendEndpointUpdateParameters from .validate_custom_domain_input import ValidateCustomDomainInput @@ -94,6 +103,7 @@ from .match_condition import MatchCondition from .custom_rule import CustomRule from .custom_rule_list import CustomRuleList + from .managed_rule_exclusion import ManagedRuleExclusion from .managed_rule_override import ManagedRuleOverride from .managed_rule_group_override import ManagedRuleGroupOverride from .managed_rule_set import ManagedRuleSet @@ -104,10 +114,6 @@ from .managed_rule_group_definition import ManagedRuleGroupDefinition from .managed_rule_set_definition import ManagedRuleSetDefinition from .front_door_paged import FrontDoorPaged -from .routing_rule_paged import RoutingRulePaged -from .health_probe_settings_model_paged import HealthProbeSettingsModelPaged -from .load_balancing_settings_model_paged import LoadBalancingSettingsModelPaged -from .backend_pool_paged import BackendPoolPaged from .frontend_endpoint_paged import FrontendEndpointPaged from .web_application_firewall_policy_paged import WebApplicationFirewallPolicyPaged from .managed_rule_set_definition_paged import ManagedRuleSetDefinitionPaged @@ -142,6 +148,8 @@ Operator, TransformType, ActionType, + ManagedRuleExclusionMatchVariable, + ManagedRuleExclusionSelectorMatchOperator, ManagedRuleEnabledState, PolicyResourceState, ) @@ -158,6 +166,7 @@ 'BackendPoolsSettings', 'FrontDoorUpdateParameters', 'PurgeParameters', + 'RoutingRuleListResult', 'SubResource', 'RouteConfiguration', 'RoutingRuleUpdateParameters', @@ -165,9 +174,12 @@ 'ForwardingConfiguration', 'RedirectConfiguration', 'Backend', + 'LoadBalancingSettingsListResult', 'LoadBalancingSettingsUpdateParameters', + 'HealthProbeSettingsListResult', 'HealthProbeSettingsUpdateParameters', 'BackendPoolUpdateParameters', + 'BackendPoolListResult', 'FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink', 'FrontendEndpointUpdateParameters', 'ValidateCustomDomainInput', @@ -184,6 +196,7 @@ 'MatchCondition', 'CustomRule', 'CustomRuleList', + 'ManagedRuleExclusion', 'ManagedRuleOverride', 'ManagedRuleGroupOverride', 'ManagedRuleSet', @@ -194,10 +207,6 @@ 'ManagedRuleGroupDefinition', 'ManagedRuleSetDefinition', 'FrontDoorPaged', - 'RoutingRulePaged', - 'HealthProbeSettingsModelPaged', - 'LoadBalancingSettingsModelPaged', - 'BackendPoolPaged', 'FrontendEndpointPaged', 'WebApplicationFirewallPolicyPaged', 'ManagedRuleSetDefinitionPaged', @@ -231,6 +240,8 @@ 'Operator', 'TransformType', 'ActionType', + 'ManagedRuleExclusionMatchVariable', + 'ManagedRuleExclusionSelectorMatchOperator', 'ManagedRuleEnabledState', 'PolicyResourceState', ] diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_list_result.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_list_result.py new file mode 100644 index 000000000000..2077aa464986 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_list_result.py @@ -0,0 +1,41 @@ +# 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 BackendPoolListResult(Model): + """Result of the request to list Backend Pools. It contains a list of Backend + Pools objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Backend Pools within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.BackendPool] + :param next_link: URL to get the next set of BackendPool objects if there + are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackendPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackendPoolListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_list_result_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_list_result_py3.py new file mode 100644 index 000000000000..d6e42a6a2183 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_list_result_py3.py @@ -0,0 +1,41 @@ +# 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 BackendPoolListResult(Model): + """Result of the request to list Backend Pools. It contains a list of Backend + Pools objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Backend Pools within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.BackendPool] + :param next_link: URL to get the next set of BackendPool objects if there + are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackendPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(BackendPoolListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_paged.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_paged.py deleted file mode 100644 index 7f530dd9c345..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pool_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class BackendPoolPaged(Paged): - """ - A paging container for iterating over a list of :class:`BackendPool ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BackendPool]'} - } - - def __init__(self, *args, **kwargs): - - super(BackendPoolPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_management_client_enums.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_management_client_enums.py index 84c635ac2f6f..f896f57c562b 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_management_client_enums.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_management_client_enums.py @@ -234,6 +234,23 @@ class ActionType(str, Enum): redirect = "Redirect" +class ManagedRuleExclusionMatchVariable(str, Enum): + + request_header_names = "RequestHeaderNames" + request_cookie_names = "RequestCookieNames" + query_string_arg_names = "QueryStringArgNames" + request_body_post_arg_names = "RequestBodyPostArgNames" + + +class ManagedRuleExclusionSelectorMatchOperator(str, Enum): + + equals = "Equals" + contains = "Contains" + starts_with = "StartsWith" + ends_with = "EndsWith" + equals_any = "EqualsAny" + + class ManagedRuleEnabledState(str, Enum): disabled = "Disabled" diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_list_result.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_list_result.py new file mode 100644 index 000000000000..4128230da941 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_list_result.py @@ -0,0 +1,42 @@ +# 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 HealthProbeSettingsListResult(Model): + """Result of the request to list HealthProbeSettings. It contains a list of + HealthProbeSettings objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of HealthProbeSettings within a Front Door. + :vartype value: + list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param next_link: URL to get the next set of HealthProbeSettings objects + if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HealthProbeSettingsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HealthProbeSettingsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_list_result_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_list_result_py3.py new file mode 100644 index 000000000000..0bc4a242611a --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_list_result_py3.py @@ -0,0 +1,42 @@ +# 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 HealthProbeSettingsListResult(Model): + """Result of the request to list HealthProbeSettings. It contains a list of + HealthProbeSettings objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of HealthProbeSettings within a Front Door. + :vartype value: + list[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] + :param next_link: URL to get the next set of HealthProbeSettings objects + if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HealthProbeSettingsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(HealthProbeSettingsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_model_paged.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_model_paged.py deleted file mode 100644 index 8d368f07bcd9..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/health_probe_settings_model_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class HealthProbeSettingsModelPaged(Paged): - """ - A paging container for iterating over a list of :class:`HealthProbeSettingsModel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[HealthProbeSettingsModel]'} - } - - def __init__(self, *args, **kwargs): - - super(HealthProbeSettingsModelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_list_result.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_list_result.py new file mode 100644 index 000000000000..f88bd8da54cd --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_list_result.py @@ -0,0 +1,43 @@ +# 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 LoadBalancingSettingsListResult(Model): + """Result of the request to list load balancing settings. It contains a list + of load balancing settings objects and a URL link to get the next set of + results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Backend Pools within a Front Door. + :vartype value: + list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param next_link: URL to get the next set of LoadBalancingSettings objects + if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancingSettingsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadBalancingSettingsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_list_result_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_list_result_py3.py new file mode 100644 index 000000000000..48cb4db4ee4d --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_list_result_py3.py @@ -0,0 +1,43 @@ +# 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 LoadBalancingSettingsListResult(Model): + """Result of the request to list load balancing settings. It contains a list + of load balancing settings objects and a URL link to get the next set of + results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Backend Pools within a Front Door. + :vartype value: + list[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] + :param next_link: URL to get the next set of LoadBalancingSettings objects + if there are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancingSettingsModel]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(LoadBalancingSettingsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_model_paged.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_model_paged.py deleted file mode 100644 index 20d94f0be273..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/load_balancing_settings_model_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class LoadBalancingSettingsModelPaged(Paged): - """ - A paging container for iterating over a list of :class:`LoadBalancingSettingsModel ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LoadBalancingSettingsModel]'} - } - - def __init__(self, *args, **kwargs): - - super(LoadBalancingSettingsModelPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition.py index 36a5110ead68..77ebcf2299f6 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition.py @@ -20,21 +20,35 @@ class ManagedRuleDefinition(Model): :ivar rule_id: Identifier for the managed rule. :vartype rule_id: str + :ivar default_state: Describes the default state for the managed rule. + Possible values include: 'Disabled', 'Enabled' + :vartype default_state: str or + ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :ivar default_action: Describes the default action to be applied when the + managed rule matches. Possible values include: 'Allow', 'Block', 'Log', + 'Redirect' + :vartype default_action: str or ~azure.mgmt.frontdoor.models.ActionType :ivar description: Describes the functionality of the managed rule. :vartype description: str """ _validation = { 'rule_id': {'readonly': True}, + 'default_state': {'readonly': True}, + 'default_action': {'readonly': True}, 'description': {'readonly': True}, } _attribute_map = { 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'default_state': {'key': 'defaultState', 'type': 'str'}, + 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } def __init__(self, **kwargs): super(ManagedRuleDefinition, self).__init__(**kwargs) self.rule_id = None + self.default_state = None + self.default_action = None self.description = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition_py3.py index 458fec2d0b6c..1ba86cdae079 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition_py3.py @@ -20,21 +20,35 @@ class ManagedRuleDefinition(Model): :ivar rule_id: Identifier for the managed rule. :vartype rule_id: str + :ivar default_state: Describes the default state for the managed rule. + Possible values include: 'Disabled', 'Enabled' + :vartype default_state: str or + ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :ivar default_action: Describes the default action to be applied when the + managed rule matches. Possible values include: 'Allow', 'Block', 'Log', + 'Redirect' + :vartype default_action: str or ~azure.mgmt.frontdoor.models.ActionType :ivar description: Describes the functionality of the managed rule. :vartype description: str """ _validation = { 'rule_id': {'readonly': True}, + 'default_state': {'readonly': True}, + 'default_action': {'readonly': True}, 'description': {'readonly': True}, } _attribute_map = { 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'default_state': {'key': 'defaultState', 'type': 'str'}, + 'default_action': {'key': 'defaultAction', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } def __init__(self, **kwargs) -> None: super(ManagedRuleDefinition, self).__init__(**kwargs) self.rule_id = None + self.default_state = None + self.default_action = None self.description = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_exclusion.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_exclusion.py new file mode 100644 index 000000000000..4f92404a8962 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_exclusion.py @@ -0,0 +1,52 @@ +# 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 ManagedRuleExclusion(Model): + """Exclude variables from managed rule evaluation. + + All required parameters must be populated in order to send to Azure. + + :param match_variable: Required. The variable type to be excluded. + Possible values include: 'RequestHeaderNames', 'RequestCookieNames', + 'QueryStringArgNames', 'RequestBodyPostArgNames' + :type match_variable: str or + ~azure.mgmt.frontdoor.models.ManagedRuleExclusionMatchVariable + :param selector_match_operator: Required. Comparison operator to apply to + the selector when specifying which elements in the collection this + exclusion applies to. Possible values include: 'Equals', 'Contains', + 'StartsWith', 'EndsWith', 'EqualsAny' + :type selector_match_operator: str or + ~azure.mgmt.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator + :param selector: Required. Selector value for which elements in the + collection this exclusion applies to. + :type selector: str + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleExclusion, self).__init__(**kwargs) + self.match_variable = kwargs.get('match_variable', None) + self.selector_match_operator = kwargs.get('selector_match_operator', None) + self.selector = kwargs.get('selector', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_exclusion_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_exclusion_py3.py new file mode 100644 index 000000000000..0ce39d22f91c --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_exclusion_py3.py @@ -0,0 +1,52 @@ +# 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 ManagedRuleExclusion(Model): + """Exclude variables from managed rule evaluation. + + All required parameters must be populated in order to send to Azure. + + :param match_variable: Required. The variable type to be excluded. + Possible values include: 'RequestHeaderNames', 'RequestCookieNames', + 'QueryStringArgNames', 'RequestBodyPostArgNames' + :type match_variable: str or + ~azure.mgmt.frontdoor.models.ManagedRuleExclusionMatchVariable + :param selector_match_operator: Required. Comparison operator to apply to + the selector when specifying which elements in the collection this + exclusion applies to. Possible values include: 'Equals', 'Contains', + 'StartsWith', 'EndsWith', 'EqualsAny' + :type selector_match_operator: str or + ~azure.mgmt.frontdoor.models.ManagedRuleExclusionSelectorMatchOperator + :param selector: Required. Selector value for which elements in the + collection this exclusion applies to. + :type selector: str + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__(self, *, match_variable, selector_match_operator, selector: str, **kwargs) -> None: + super(ManagedRuleExclusion, self).__init__(**kwargs) + self.match_variable = match_variable + self.selector_match_operator = selector_match_operator + self.selector = selector diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override.py index 370b57cfbd09..006ead2e4b59 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override.py @@ -20,6 +20,9 @@ class ManagedRuleGroupOverride(Model): :param rule_group_name: Required. Describes the managed rule group to override. :type rule_group_name: str + :param exclusions: Describes the exclusions that are applied to all rules + in the group. + :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] :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.frontdoor.models.ManagedRuleOverride] @@ -31,10 +34,12 @@ class ManagedRuleGroupOverride(Model): _attribute_map = { 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, } def __init__(self, **kwargs): super(ManagedRuleGroupOverride, self).__init__(**kwargs) self.rule_group_name = kwargs.get('rule_group_name', None) + self.exclusions = kwargs.get('exclusions', None) self.rules = kwargs.get('rules', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override_py3.py index f7c00c8a3736..9218d912569f 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override_py3.py @@ -20,6 +20,9 @@ class ManagedRuleGroupOverride(Model): :param rule_group_name: Required. Describes the managed rule group to override. :type rule_group_name: str + :param exclusions: Describes the exclusions that are applied to all rules + in the group. + :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] :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.frontdoor.models.ManagedRuleOverride] @@ -31,10 +34,12 @@ class ManagedRuleGroupOverride(Model): _attribute_map = { 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, } - def __init__(self, *, rule_group_name: str, rules=None, **kwargs) -> None: + def __init__(self, *, rule_group_name: str, exclusions=None, rules=None, **kwargs) -> None: super(ManagedRuleGroupOverride, self).__init__(**kwargs) self.rule_group_name = rule_group_name + self.exclusions = exclusions self.rules = rules diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override.py index 7174011cac7a..f716795d8f15 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override.py @@ -27,6 +27,9 @@ class ManagedRuleOverride(Model): :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.frontdoor.models.ActionType + :param exclusions: Describes the exclusions that are applied to this + specific rule. + :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] """ _validation = { @@ -37,6 +40,7 @@ class ManagedRuleOverride(Model): 'rule_id': {'key': 'ruleId', 'type': 'str'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'action': {'key': 'action', 'type': 'str'}, + 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, } def __init__(self, **kwargs): @@ -44,3 +48,4 @@ def __init__(self, **kwargs): self.rule_id = kwargs.get('rule_id', None) self.enabled_state = kwargs.get('enabled_state', None) self.action = kwargs.get('action', None) + self.exclusions = kwargs.get('exclusions', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override_py3.py index 8dcf5fbd8318..502a60766dde 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override_py3.py @@ -27,6 +27,9 @@ class ManagedRuleOverride(Model): :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.frontdoor.models.ActionType + :param exclusions: Describes the exclusions that are applied to this + specific rule. + :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] """ _validation = { @@ -37,10 +40,12 @@ class ManagedRuleOverride(Model): 'rule_id': {'key': 'ruleId', 'type': 'str'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'action': {'key': 'action', 'type': 'str'}, + 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, } - def __init__(self, *, rule_id: str, enabled_state=None, action=None, **kwargs) -> None: + def __init__(self, *, rule_id: str, enabled_state=None, action=None, exclusions=None, **kwargs) -> None: super(ManagedRuleOverride, self).__init__(**kwargs) self.rule_id = rule_id self.enabled_state = enabled_state self.action = action + self.exclusions = exclusions diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set.py index 2f9ecc12febb..f66ce140396a 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set.py @@ -22,6 +22,9 @@ class ManagedRuleSet(Model): :param rule_set_version: Required. Defines the version of the rule set to use. :type rule_set_version: str + :param exclusions: Describes the exclusions that are applied to all rules + in the set. + :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] :param rule_group_overrides: Defines the rule group overrides to apply to the rule set. :type rule_group_overrides: @@ -36,6 +39,7 @@ class ManagedRuleSet(Model): _attribute_map = { 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, } @@ -43,4 +47,5 @@ def __init__(self, **kwargs): super(ManagedRuleSet, self).__init__(**kwargs) self.rule_set_type = kwargs.get('rule_set_type', None) self.rule_set_version = kwargs.get('rule_set_version', None) + self.exclusions = kwargs.get('exclusions', None) self.rule_group_overrides = kwargs.get('rule_group_overrides', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_py3.py index 88e6a6d3d9a0..cc77e482911a 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_py3.py @@ -22,6 +22,9 @@ class ManagedRuleSet(Model): :param rule_set_version: Required. Defines the version of the rule set to use. :type rule_set_version: str + :param exclusions: Describes the exclusions that are applied to all rules + in the set. + :type exclusions: list[~azure.mgmt.frontdoor.models.ManagedRuleExclusion] :param rule_group_overrides: Defines the rule group overrides to apply to the rule set. :type rule_group_overrides: @@ -36,11 +39,13 @@ class ManagedRuleSet(Model): _attribute_map = { 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'exclusions': {'key': 'exclusions', 'type': '[ManagedRuleExclusion]'}, 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, } - def __init__(self, *, rule_set_type: str, rule_set_version: str, rule_group_overrides=None, **kwargs) -> None: + def __init__(self, *, rule_set_type: str, rule_set_version: str, exclusions=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.exclusions = exclusions self.rule_group_overrides = rule_group_overrides diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_list_result.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_list_result.py new file mode 100644 index 000000000000..b5ea266e716e --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_list_result.py @@ -0,0 +1,41 @@ +# 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 RoutingRuleListResult(Model): + """Result of the request to list Routing Rules. It contains a list of Routing + Rule objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Routing Rules within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.RoutingRule] + :param next_link: URL to get the next set of RoutingRule objects if there + are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoutingRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RoutingRuleListResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_list_result_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_list_result_py3.py new file mode 100644 index 000000000000..15dd669d006a --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_list_result_py3.py @@ -0,0 +1,41 @@ +# 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 RoutingRuleListResult(Model): + """Result of the request to list Routing Rules. It contains a list of Routing + Rule objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: List of Routing Rules within a Front Door. + :vartype value: list[~azure.mgmt.frontdoor.models.RoutingRule] + :param next_link: URL to get the next set of RoutingRule objects if there + are any. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoutingRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(RoutingRuleListResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_paged.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_paged.py deleted file mode 100644 index f45f2a926a5d..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class RoutingRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`RoutingRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RoutingRule]'} - } - - def __init__(self, *args, **kwargs): - - super(RoutingRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/__init__.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/__init__.py index 6b950669b1ba..29cd448203e8 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/__init__.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/__init__.py @@ -10,10 +10,6 @@ # -------------------------------------------------------------------------- from .front_doors_operations import FrontDoorsOperations -from .routing_rules_operations import RoutingRulesOperations -from .health_probe_settings_operations import HealthProbeSettingsOperations -from .load_balancing_settings_operations import LoadBalancingSettingsOperations -from .backend_pools_operations import BackendPoolsOperations from .frontend_endpoints_operations import FrontendEndpointsOperations from .endpoints_operations import EndpointsOperations from .policies_operations import PoliciesOperations @@ -21,10 +17,6 @@ __all__ = [ 'FrontDoorsOperations', - 'RoutingRulesOperations', - 'HealthProbeSettingsOperations', - 'LoadBalancingSettingsOperations', - 'BackendPoolsOperations', 'FrontendEndpointsOperations', 'EndpointsOperations', 'PoliciesOperations', diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/backend_pools_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/backend_pools_operations.py deleted file mode 100644 index 5d5ac0d65f3b..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/backend_pools_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class BackendPoolsOperations(object): - """BackendPoolsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config - - def list_by_front_door( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the Backend Pools within a Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of BackendPool - :rtype: - ~azure.mgmt.frontdoor.models.BackendPoolPaged[~azure.mgmt.frontdoor.models.BackendPool] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_front_door.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.BackendPoolPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BackendPoolPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools'} - - def get( - self, resource_group_name, front_door_name, backend_pool_name, custom_headers=None, raw=False, **operation_config): - """Gets a Backend Pool with the specified Pool name within the specified - Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param backend_pool_name: Name of the Backend Pool which is unique - within the Front Door. - :type backend_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: BackendPool or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.BackendPool or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BackendPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools/{backendPoolName}'} - - - def _create_or_update_initial( - self, resource_group_name, front_door_name, backend_pool_name, backend_pool_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(backend_pool_parameters, 'BackendPool') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('BackendPool', response) - if response.status_code == 201: - deserialized = self._deserialize('BackendPool', response) - if response.status_code == 202: - deserialized = self._deserialize('BackendPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, front_door_name, backend_pool_name, backend_pool_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new Backend Pool with the specified Pool name within the - specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param backend_pool_name: Name of the Backend Pool which is unique - within the Front Door. - :type backend_pool_name: str - :param backend_pool_parameters: Backend Pool properties needed to - create a new Pool. - :type backend_pool_parameters: - ~azure.mgmt.frontdoor.models.BackendPool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns BackendPool or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.BackendPool] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.BackendPool]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - backend_pool_name=backend_pool_name, - backend_pool_parameters=backend_pool_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('BackendPool', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools/{backendPoolName}'} - - - def _delete_initial( - self, resource_group_name, front_door_name, backend_pool_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, front_door_name, backend_pool_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Backend Pool with the specified parameters. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param backend_pool_name: Name of the Backend Pool which is unique - within the Front Door. - :type backend_pool_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - backend_pool_name=backend_pool_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools/{backendPoolName}'} diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/frontend_endpoints_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/frontend_endpoints_operations.py index 2efde3061737..9116cd70f085 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/frontend_endpoints_operations.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/frontend_endpoints_operations.py @@ -178,204 +178,6 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}'} - def _create_or_update_initial( - self, resource_group_name, front_door_name, frontend_endpoint_name, frontend_endpoint_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(frontend_endpoint_parameters, 'FrontendEndpoint') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('FrontendEndpoint', response) - if response.status_code == 201: - deserialized = self._deserialize('FrontendEndpoint', response) - if response.status_code == 202: - deserialized = self._deserialize('FrontendEndpoint', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, front_door_name, frontend_endpoint_name, frontend_endpoint_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new frontend endpoint with the specified host name within the - specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param frontend_endpoint_name: Name of the Frontend endpoint which is - unique within the Front Door. - :type frontend_endpoint_name: str - :param frontend_endpoint_parameters: Frontend endpoint properties - needed to create a new endpoint. - :type frontend_endpoint_parameters: - ~azure.mgmt.frontdoor.models.FrontendEndpoint - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns FrontendEndpoint or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.FrontendEndpoint] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.FrontendEndpoint]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - frontend_endpoint_name=frontend_endpoint_name, - frontend_endpoint_parameters=frontend_endpoint_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('FrontendEndpoint', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}'} - - - def _delete_initial( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'frontendEndpointName': self._serialize.url("frontend_endpoint_name", frontend_endpoint_name, 'str', max_length=255, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, front_door_name, frontend_endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing frontend endpoint with the specified parameters. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param frontend_endpoint_name: Name of the Frontend endpoint which is - unique within the Front Door. - :type frontend_endpoint_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - frontend_endpoint_name=frontend_endpoint_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}'} - - def _enable_https_initial( self, resource_group_name, front_door_name, frontend_endpoint_name, custom_https_configuration, custom_headers=None, raw=False, **operation_config): # Construct URL diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/health_probe_settings_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/health_probe_settings_operations.py deleted file mode 100644 index 1c7a54e017ad..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/health_probe_settings_operations.py +++ /dev/null @@ -1,377 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class HealthProbeSettingsOperations(object): - """HealthProbeSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config - - def list_by_front_door( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the HealthProbeSettings within a Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of HealthProbeSettingsModel - :rtype: - ~azure.mgmt.frontdoor.models.HealthProbeSettingsModelPaged[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_front_door.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.HealthProbeSettingsModelPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.HealthProbeSettingsModelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings'} - - def get( - self, resource_group_name, front_door_name, health_probe_settings_name, custom_headers=None, raw=False, **operation_config): - """Gets a HealthProbeSettings with the specified Rule name within the - specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param health_probe_settings_name: Name of the health probe settings - which is unique within the Front Door. - :type health_probe_settings_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: HealthProbeSettingsModel or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.HealthProbeSettingsModel or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'healthProbeSettingsName': self._serialize.url("health_probe_settings_name", health_probe_settings_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('HealthProbeSettingsModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings/{healthProbeSettingsName}'} - - - def _create_or_update_initial( - self, resource_group_name, front_door_name, health_probe_settings_name, health_probe_settings_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'healthProbeSettingsName': self._serialize.url("health_probe_settings_name", health_probe_settings_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(health_probe_settings_parameters, 'HealthProbeSettingsModel') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('HealthProbeSettingsModel', response) - if response.status_code == 201: - deserialized = self._deserialize('HealthProbeSettingsModel', response) - if response.status_code == 202: - deserialized = self._deserialize('HealthProbeSettingsModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, front_door_name, health_probe_settings_name, health_probe_settings_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new HealthProbeSettings with the specified Rule name within - the specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param health_probe_settings_name: Name of the health probe settings - which is unique within the Front Door. - :type health_probe_settings_name: str - :param health_probe_settings_parameters: HealthProbeSettings - properties needed to create a new Front Door. - :type health_probe_settings_parameters: - ~azure.mgmt.frontdoor.models.HealthProbeSettingsModel - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - HealthProbeSettingsModel or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.HealthProbeSettingsModel]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - health_probe_settings_name=health_probe_settings_name, - health_probe_settings_parameters=health_probe_settings_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('HealthProbeSettingsModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings/{healthProbeSettingsName}'} - - - def _delete_initial( - self, resource_group_name, front_door_name, health_probe_settings_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'healthProbeSettingsName': self._serialize.url("health_probe_settings_name", health_probe_settings_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, front_door_name, health_probe_settings_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing HealthProbeSettings with the specified parameters. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param health_probe_settings_name: Name of the health probe settings - which is unique within the Front Door. - :type health_probe_settings_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - health_probe_settings_name=health_probe_settings_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings/{healthProbeSettingsName}'} diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/load_balancing_settings_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/load_balancing_settings_operations.py deleted file mode 100644 index 153398dda3d5..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/load_balancing_settings_operations.py +++ /dev/null @@ -1,378 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class LoadBalancingSettingsOperations(object): - """LoadBalancingSettingsOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config - - def list_by_front_door( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the LoadBalancingSettings within a Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of LoadBalancingSettingsModel - :rtype: - ~azure.mgmt.frontdoor.models.LoadBalancingSettingsModelPaged[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_front_door.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.LoadBalancingSettingsModelPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.LoadBalancingSettingsModelPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings'} - - def get( - self, resource_group_name, front_door_name, load_balancing_settings_name, custom_headers=None, raw=False, **operation_config): - """Gets a LoadBalancingSettings with the specified Rule name within the - specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param load_balancing_settings_name: Name of the load balancing - settings which is unique within the Front Door. - :type load_balancing_settings_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LoadBalancingSettingsModel or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'loadBalancingSettingsName': self._serialize.url("load_balancing_settings_name", load_balancing_settings_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LoadBalancingSettingsModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings/{loadBalancingSettingsName}'} - - - def _create_or_update_initial( - self, resource_group_name, front_door_name, load_balancing_settings_name, load_balancing_settings_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'loadBalancingSettingsName': self._serialize.url("load_balancing_settings_name", load_balancing_settings_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(load_balancing_settings_parameters, 'LoadBalancingSettingsModel') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('LoadBalancingSettingsModel', response) - if response.status_code == 201: - deserialized = self._deserialize('LoadBalancingSettingsModel', response) - if response.status_code == 202: - deserialized = self._deserialize('LoadBalancingSettingsModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, front_door_name, load_balancing_settings_name, load_balancing_settings_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new LoadBalancingSettings with the specified Rule name within - the specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param load_balancing_settings_name: Name of the load balancing - settings which is unique within the Front Door. - :type load_balancing_settings_name: str - :param load_balancing_settings_parameters: LoadBalancingSettings - properties needed to create a new Front Door. - :type load_balancing_settings_parameters: - ~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns - LoadBalancingSettingsModel or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.LoadBalancingSettingsModel]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - load_balancing_settings_name=load_balancing_settings_name, - load_balancing_settings_parameters=load_balancing_settings_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('LoadBalancingSettingsModel', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings/{loadBalancingSettingsName}'} - - - def _delete_initial( - self, resource_group_name, front_door_name, load_balancing_settings_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'loadBalancingSettingsName': self._serialize.url("load_balancing_settings_name", load_balancing_settings_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, front_door_name, load_balancing_settings_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing LoadBalancingSettings with the specified - parameters. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param load_balancing_settings_name: Name of the load balancing - settings which is unique within the Front Door. - :type load_balancing_settings_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - load_balancing_settings_name=load_balancing_settings_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings/{loadBalancingSettingsName}'} diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/managed_rule_sets_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/managed_rule_sets_operations.py index 25288522469d..5c804ff1f848 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/managed_rule_sets_operations.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/managed_rule_sets_operations.py @@ -22,7 +22,7 @@ class ManagedRuleSetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-03-01". + :ivar api_version: Client API version. Constant value: "2019-10-01". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/policies_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/policies_operations.py index 8755d21e82b0..49eb097d5b19 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/policies_operations.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/policies_operations.py @@ -25,7 +25,7 @@ class PoliciesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-03-01". + :ivar api_version: Client API version. Constant value: "2019-10-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-10-01" self.config = config diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/routing_rules_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/routing_rules_operations.py deleted file mode 100644 index 53df799b014e..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/routing_rules_operations.py +++ /dev/null @@ -1,376 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class RoutingRulesOperations(object): - """RoutingRulesOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2019-05-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2019-05-01" - - self.config = config - - def list_by_front_door( - self, resource_group_name, front_door_name, custom_headers=None, raw=False, **operation_config): - """Lists all of the Routing Rules within a Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of RoutingRule - :rtype: - ~azure.mgmt.frontdoor.models.RoutingRulePaged[~azure.mgmt.frontdoor.models.RoutingRule] - :raises: - :class:`ErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_front_door.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.RoutingRulePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.RoutingRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_front_door.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules'} - - def get( - self, resource_group_name, front_door_name, routing_rule_name, custom_headers=None, raw=False, **operation_config): - """Gets a Routing Rule with the specified Rule name within the specified - Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param routing_rule_name: Name of the Routing Rule which is unique - within the Front Door. - :type routing_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RoutingRule or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.frontdoor.models.RoutingRule or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'routingRuleName': self._serialize.url("routing_rule_name", routing_rule_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RoutingRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules/{routingRuleName}'} - - - def _create_or_update_initial( - self, resource_group_name, front_door_name, routing_rule_name, routing_rule_parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'routingRuleName': self._serialize.url("routing_rule_name", routing_rule_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(routing_rule_parameters, 'RoutingRule') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RoutingRule', response) - if response.status_code == 201: - deserialized = self._deserialize('RoutingRule', response) - if response.status_code == 202: - deserialized = self._deserialize('RoutingRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, front_door_name, routing_rule_name, routing_rule_parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new Routing Rule with the specified Rule name within the - specified Front Door. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param routing_rule_name: Name of the Routing Rule which is unique - within the Front Door. - :type routing_rule_name: str - :param routing_rule_parameters: Routing Rule properties needed to - create a new Front Door. - :type routing_rule_parameters: - ~azure.mgmt.frontdoor.models.RoutingRule - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns RoutingRule or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.RoutingRule] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.RoutingRule]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - routing_rule_name=routing_rule_name, - routing_rule_parameters=routing_rule_parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('RoutingRule', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules/{routingRuleName}'} - - - def _delete_initial( - self, resource_group_name, front_door_name, routing_rule_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), - 'frontDoorName': self._serialize.url("front_door_name", front_door_name, 'str', max_length=64, min_length=5, pattern=r'^[a-zA-Z0-9]+([-a-zA-Z0-9]?[a-zA-Z0-9])*$'), - 'routingRuleName': self._serialize.url("routing_rule_name", routing_rule_name, 'str', max_length=90, min_length=1, pattern=r'^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [202, 204]: - raise models.ErrorResponseException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, front_door_name, routing_rule_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes an existing Routing Rule with the specified parameters. - - :param resource_group_name: Name of the Resource group within the - Azure subscription. - :type resource_group_name: str - :param front_door_name: Name of the Front Door which is globally - unique. - :type front_door_name: str - :param routing_rule_name: Name of the Routing Rule which is unique - within the Front Door. - :type routing_rule_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorResponseException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - front_door_name=front_door_name, - routing_rule_name=routing_rule_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules/{routingRuleName}'}