From 6f77580b1d750cfddf6fb1c9ad926b9288b0ca78 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 10 Jun 2019 14:11:21 -0700 Subject: [PATCH] [AutoPR frontdoor/resource-manager] Frontdoor Py folder (#5781) * Generated from 3326a4e20905074f28b72cf812a73da7e1603985 Frontdoor Py folder * Packaging update of azure-mgmt-frontdoor --- .../frontdoor/front_door_management_client.py | 9 +- .../azure/mgmt/frontdoor/models/__init__.py | 112 ++++++++++----- .../azure_managed_override_rule_group.py | 42 ------ .../azure_managed_override_rule_group_py3.py | 42 ------ .../models/azure_managed_rule_set.py | 46 ------- .../models/azure_managed_rule_set_py3.py | 46 ------- .../azure/mgmt/frontdoor/models/backend.py | 2 +- .../models/backend_pools_settings.py | 32 +++++ .../models/backend_pools_settings_py3.py | 32 +++++ .../mgmt/frontdoor/models/backend_py3.py | 2 +- .../mgmt/frontdoor/models/custom_rule.py | 46 +++---- .../{custom_rules.py => custom_rule_list.py} | 4 +- ...m_rules_py3.py => custom_rule_list_py3.py} | 4 +- .../mgmt/frontdoor/models/custom_rule_py3.py | 48 +++---- .../models/forwarding_configuration.py | 56 ++++++++ .../models/forwarding_configuration_py3.py | 56 ++++++++ .../azure/mgmt/frontdoor/models/front_door.py | 5 + .../front_door_management_client_enums.py | 79 ++++++++--- .../mgmt/frontdoor/models/front_door_py3.py | 7 +- .../models/front_door_update_parameters.py | 5 + .../front_door_update_parameters_py3.py | 7 +- ...rule_sets.py => frontend_endpoint_link.py} | 14 +- ...s_py3.py => frontend_endpoint_link_py3.py} | 16 +-- .../models/managed_rule_definition.py | 40 ++++++ .../models/managed_rule_definition_py3.py | 40 ++++++ .../models/managed_rule_group_definition.py | 45 ++++++ .../managed_rule_group_definition_py3.py | 45 ++++++ .../models/managed_rule_group_override.py | 40 ++++++ .../models/managed_rule_group_override_py3.py | 40 ++++++ .../frontdoor/models/managed_rule_override.py | 46 +++++++ .../models/managed_rule_override_py3.py | 46 +++++++ .../mgmt/frontdoor/models/managed_rule_set.py | 33 ++--- .../models/managed_rule_set_definition.py | 69 ++++++++++ .../managed_rule_set_definition_paged.py | 27 ++++ .../models/managed_rule_set_definition_py3.py | 69 ++++++++++ .../frontdoor/models/managed_rule_set_list.py | 28 ++++ .../models/managed_rule_set_list_py3.py | 28 ++++ .../frontdoor/models/managed_rule_set_py3.py | 35 +++-- ...match_condition1.py => match_condition.py} | 35 +++-- ...ndition1_py3.py => match_condition_py3.py} | 37 ++--- .../mgmt/frontdoor/models/policy_settings.py | 34 ++++- .../frontdoor/models/policy_settings_py3.py | 36 ++++- .../models/redirect_configuration.py | 73 ++++++++++ .../models/redirect_configuration_py3.py | 73 ++++++++++ .../frontdoor/models/route_configuration.py | 41 ++++++ .../models/route_configuration_py3.py | 41 ++++++ .../mgmt/frontdoor/models/routing_rule.py | 28 +--- .../mgmt/frontdoor/models/routing_rule_py3.py | 30 +--- .../models/routing_rule_update_parameters.py | 28 +--- .../routing_rule_update_parameters_py3.py | 30 +--- ....py => web_application_firewall_policy.py} | 30 ++-- ... web_application_firewall_policy_paged.py} | 8 +- ...=> web_application_firewall_policy_py3.py} | 30 ++-- .../mgmt/frontdoor/operations/__init__.py | 2 + .../operations/backend_pools_operations.py | 4 +- .../operations/endpoints_operations.py | 4 +- .../operations/front_doors_operations.py | 4 +- .../frontend_endpoints_operations.py | 4 +- .../health_probe_settings_operations.py | 4 +- .../load_balancing_settings_operations.py | 4 +- .../managed_rule_sets_operations.py | 100 ++++++++++++++ .../operations/policies_operations.py | 129 +++++++++++------- .../operations/routing_rules_operations.py | 4 +- sdk/network/azure-mgmt-frontdoor/setup.py | 1 + 64 files changed, 1586 insertions(+), 571 deletions(-) delete mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group.py delete mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group_py3.py delete mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set.py delete mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings_py3.py rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{custom_rules.py => custom_rule_list.py} (90%) rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{custom_rules_py3.py => custom_rule_list_py3.py} (90%) create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration_py3.py rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{managed_rule_sets.py => frontend_endpoint_link.py} (61%) rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{managed_rule_sets_py3.py => frontend_endpoint_link_py3.py} (57%) create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_paged.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list_py3.py rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{match_condition1.py => match_condition.py} (58%) rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{match_condition1_py3.py => match_condition_py3.py} (56%) create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration_py3.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration.py create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration_py3.py rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{web_application_firewall_policy1.py => web_application_firewall_policy.py} (76%) rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{web_application_firewall_policy1_paged.py => web_application_firewall_policy_paged.py} (76%) rename sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/{web_application_firewall_policy1_py3.py => web_application_firewall_policy_py3.py} (76%) create mode 100644 sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/managed_rule_sets_operations.py 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 7382a8928955..89aa4286479d 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 @@ -26,6 +26,7 @@ from .operations.frontend_endpoints_operations import FrontendEndpointsOperations from .operations.endpoints_operations import EndpointsOperations from .operations.policies_operations import PoliciesOperations +from .operations.managed_rule_sets_operations import ManagedRuleSetsOperations from . import models @@ -85,6 +86,8 @@ class FrontDoorManagementClient(SDKClient): :vartype endpoints: azure.mgmt.frontdoor.operations.EndpointsOperations :ivar policies: Policies operations :vartype policies: azure.mgmt.frontdoor.operations.PoliciesOperations + :ivar managed_rule_sets: ManagedRuleSets operations + :vartype managed_rule_sets: azure.mgmt.frontdoor.operations.ManagedRuleSetsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -122,6 +125,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.policies = PoliciesOperations( self._client, self.config, self._serialize, self._deserialize) + self.managed_rule_sets = ManagedRuleSetsOperations( + self._client, self.config, self._serialize, self._deserialize) def check_front_door_name_availability( self, name, type, custom_headers=None, raw=False, **operation_config): @@ -146,7 +151,7 @@ def check_front_door_name_availability( """ check_front_door_name_availability_input = models.CheckNameAvailabilityInput(name=name, type=type) - api_version = "2018-08-01" + api_version = "2019-04-01" # Construct URL url = self.check_front_door_name_availability.metadata['url'] @@ -211,7 +216,7 @@ def check_front_door_name_availability_with_subscription( """ check_front_door_name_availability_input = models.CheckNameAvailabilityInput(name=name, type=type) - api_version = "2018-08-01" + api_version = "2019-04-01" # Construct URL url = self.check_front_door_name_availability_with_subscription.metadata['url'] 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 8426d3c4cca0..f4f564eae7dd 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 @@ -18,11 +18,15 @@ from .key_vault_certificate_source_parameters_vault_py3 import KeyVaultCertificateSourceParametersVault from .custom_https_configuration_py3 import CustomHttpsConfiguration from .frontend_endpoint_py3 import FrontendEndpoint + from .backend_pools_settings_py3 import BackendPoolsSettings from .front_door_update_parameters_py3 import FrontDoorUpdateParameters from .purge_parameters_py3 import PurgeParameters from .sub_resource_py3 import SubResource - from .cache_configuration_py3 import CacheConfiguration + from .route_configuration_py3 import RouteConfiguration from .routing_rule_update_parameters_py3 import RoutingRuleUpdateParameters + from .cache_configuration_py3 import CacheConfiguration + from .forwarding_configuration_py3 import ForwardingConfiguration + from .redirect_configuration_py3 import RedirectConfiguration from .backend_py3 import Backend from .load_balancing_settings_update_parameters_py3 import LoadBalancingSettingsUpdateParameters from .health_probe_settings_update_parameters_py3 import HealthProbeSettingsUpdateParameters @@ -40,14 +44,18 @@ from .azure_async_operation_result_py3 import AzureAsyncOperationResult from .tags_object_py3 import TagsObject from .policy_settings_py3 import PolicySettings - from .match_condition1_py3 import MatchCondition1 + from .match_condition_py3 import MatchCondition from .custom_rule_py3 import CustomRule - from .custom_rules_py3 import CustomRules + from .custom_rule_list_py3 import CustomRuleList + from .managed_rule_override_py3 import ManagedRuleOverride + from .managed_rule_group_override_py3 import ManagedRuleGroupOverride from .managed_rule_set_py3 import ManagedRuleSet - from .managed_rule_sets_py3 import ManagedRuleSets - from .web_application_firewall_policy1_py3 import WebApplicationFirewallPolicy1 - from .azure_managed_override_rule_group_py3 import AzureManagedOverrideRuleGroup - from .azure_managed_rule_set_py3 import AzureManagedRuleSet + from .managed_rule_set_list_py3 import ManagedRuleSetList + from .frontend_endpoint_link_py3 import FrontendEndpointLink + from .web_application_firewall_policy_py3 import WebApplicationFirewallPolicy + from .managed_rule_definition_py3 import ManagedRuleDefinition + from .managed_rule_group_definition_py3 import ManagedRuleGroupDefinition + from .managed_rule_set_definition_py3 import ManagedRuleSetDefinition except (SyntaxError, ImportError): from .front_door import FrontDoor from .routing_rule import RoutingRule @@ -57,11 +65,15 @@ from .key_vault_certificate_source_parameters_vault import KeyVaultCertificateSourceParametersVault from .custom_https_configuration import CustomHttpsConfiguration from .frontend_endpoint import FrontendEndpoint + from .backend_pools_settings import BackendPoolsSettings from .front_door_update_parameters import FrontDoorUpdateParameters from .purge_parameters import PurgeParameters from .sub_resource import SubResource - from .cache_configuration import CacheConfiguration + from .route_configuration import RouteConfiguration from .routing_rule_update_parameters import RoutingRuleUpdateParameters + from .cache_configuration import CacheConfiguration + from .forwarding_configuration import ForwardingConfiguration + from .redirect_configuration import RedirectConfiguration from .backend import Backend from .load_balancing_settings_update_parameters import LoadBalancingSettingsUpdateParameters from .health_probe_settings_update_parameters import HealthProbeSettingsUpdateParameters @@ -79,21 +91,26 @@ from .azure_async_operation_result import AzureAsyncOperationResult from .tags_object import TagsObject from .policy_settings import PolicySettings - from .match_condition1 import MatchCondition1 + from .match_condition import MatchCondition from .custom_rule import CustomRule - from .custom_rules import CustomRules + from .custom_rule_list import CustomRuleList + from .managed_rule_override import ManagedRuleOverride + from .managed_rule_group_override import ManagedRuleGroupOverride from .managed_rule_set import ManagedRuleSet - from .managed_rule_sets import ManagedRuleSets - from .web_application_firewall_policy1 import WebApplicationFirewallPolicy1 - from .azure_managed_override_rule_group import AzureManagedOverrideRuleGroup - from .azure_managed_rule_set import AzureManagedRuleSet + from .managed_rule_set_list import ManagedRuleSetList + from .frontend_endpoint_link import FrontendEndpointLink + from .web_application_firewall_policy import WebApplicationFirewallPolicy + from .managed_rule_definition import ManagedRuleDefinition + 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_policy1_paged import WebApplicationFirewallPolicy1Paged +from .web_application_firewall_policy_paged import WebApplicationFirewallPolicyPaged +from .managed_rule_set_definition_paged import ManagedRuleSetDefinitionPaged from .front_door_management_client_enums import ( FrontDoorResourceState, CustomHttpsProvisioningState, @@ -101,24 +118,30 @@ FrontDoorCertificateSource, FrontDoorTlsProtocolType, FrontDoorCertificateType, + EnforceCertificateNameCheckEnabledState, FrontDoorEnabledState, FrontDoorProtocol, + RoutingRuleEnabledState, FrontDoorForwardingProtocol, FrontDoorQuery, DynamicCompressionEnabled, + FrontDoorRedirectType, + FrontDoorRedirectProtocol, + BackendEnabledState, SessionAffinityEnabledState, ResourceType, Availability, NetworkOperationStatus, - EnabledState, - Mode, + PolicyEnabledState, + PolicyMode, + CustomRuleEnabledState, RuleType, - MatchCondition, + MatchVariable, Operator, - Action, - Transform, - WebApplicationFirewallPolicy, - RuleGroupOverride, + TransformType, + ActionType, + ManagedRuleEnabledState, + PolicyResourceState, ) __all__ = [ @@ -130,11 +153,15 @@ 'KeyVaultCertificateSourceParametersVault', 'CustomHttpsConfiguration', 'FrontendEndpoint', + 'BackendPoolsSettings', 'FrontDoorUpdateParameters', 'PurgeParameters', 'SubResource', - 'CacheConfiguration', + 'RouteConfiguration', 'RoutingRuleUpdateParameters', + 'CacheConfiguration', + 'ForwardingConfiguration', + 'RedirectConfiguration', 'Backend', 'LoadBalancingSettingsUpdateParameters', 'HealthProbeSettingsUpdateParameters', @@ -152,43 +179,54 @@ 'AzureAsyncOperationResult', 'TagsObject', 'PolicySettings', - 'MatchCondition1', + 'MatchCondition', 'CustomRule', - 'CustomRules', + 'CustomRuleList', + 'ManagedRuleOverride', + 'ManagedRuleGroupOverride', 'ManagedRuleSet', - 'ManagedRuleSets', - 'WebApplicationFirewallPolicy1', - 'AzureManagedOverrideRuleGroup', - 'AzureManagedRuleSet', + 'ManagedRuleSetList', + 'FrontendEndpointLink', + 'WebApplicationFirewallPolicy', + 'ManagedRuleDefinition', + 'ManagedRuleGroupDefinition', + 'ManagedRuleSetDefinition', 'FrontDoorPaged', 'RoutingRulePaged', 'HealthProbeSettingsModelPaged', 'LoadBalancingSettingsModelPaged', 'BackendPoolPaged', 'FrontendEndpointPaged', - 'WebApplicationFirewallPolicy1Paged', + 'WebApplicationFirewallPolicyPaged', + 'ManagedRuleSetDefinitionPaged', 'FrontDoorResourceState', 'CustomHttpsProvisioningState', 'CustomHttpsProvisioningSubstate', 'FrontDoorCertificateSource', 'FrontDoorTlsProtocolType', 'FrontDoorCertificateType', + 'EnforceCertificateNameCheckEnabledState', 'FrontDoorEnabledState', 'FrontDoorProtocol', + 'RoutingRuleEnabledState', 'FrontDoorForwardingProtocol', 'FrontDoorQuery', 'DynamicCompressionEnabled', + 'FrontDoorRedirectType', + 'FrontDoorRedirectProtocol', + 'BackendEnabledState', 'SessionAffinityEnabledState', 'ResourceType', 'Availability', 'NetworkOperationStatus', - 'EnabledState', - 'Mode', + 'PolicyEnabledState', + 'PolicyMode', + 'CustomRuleEnabledState', 'RuleType', - 'MatchCondition', + 'MatchVariable', 'Operator', - 'Action', - 'Transform', - 'WebApplicationFirewallPolicy', - 'RuleGroupOverride', + 'TransformType', + 'ActionType', + 'ManagedRuleEnabledState', + 'PolicyResourceState', ] diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group.py deleted file mode 100644 index 3602d32adfc3..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group.py +++ /dev/null @@ -1,42 +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.serialization import Model - - -class AzureManagedOverrideRuleGroup(Model): - """Defines contents of a web application rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_override: Required. Describes override rule group. - Possible values include: 'SqlInjection', 'XSS' - :type rule_group_override: str or - ~azure.mgmt.frontdoor.models.RuleGroupOverride - :param action: Required. Type of Actions. Possible values include: - 'Allow', 'Block', 'Log' - :type action: str or ~azure.mgmt.frontdoor.models.Action - """ - - _validation = { - 'rule_group_override': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'rule_group_override': {'key': 'ruleGroupOverride', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AzureManagedOverrideRuleGroup, self).__init__(**kwargs) - self.rule_group_override = kwargs.get('rule_group_override', None) - self.action = kwargs.get('action', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group_py3.py deleted file mode 100644 index 3080e02399fa..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_override_rule_group_py3.py +++ /dev/null @@ -1,42 +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.serialization import Model - - -class AzureManagedOverrideRuleGroup(Model): - """Defines contents of a web application rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_override: Required. Describes override rule group. - Possible values include: 'SqlInjection', 'XSS' - :type rule_group_override: str or - ~azure.mgmt.frontdoor.models.RuleGroupOverride - :param action: Required. Type of Actions. Possible values include: - 'Allow', 'Block', 'Log' - :type action: str or ~azure.mgmt.frontdoor.models.Action - """ - - _validation = { - 'rule_group_override': {'required': True}, - 'action': {'required': True}, - } - - _attribute_map = { - 'rule_group_override': {'key': 'ruleGroupOverride', 'type': 'str'}, - 'action': {'key': 'action', 'type': 'str'}, - } - - def __init__(self, *, rule_group_override, action, **kwargs) -> None: - super(AzureManagedOverrideRuleGroup, self).__init__(**kwargs) - self.rule_group_override = rule_group_override - self.action = action diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set.py deleted file mode 100644 index 005935666d49..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set.py +++ /dev/null @@ -1,46 +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 .managed_rule_set import ManagedRuleSet - - -class AzureManagedRuleSet(ManagedRuleSet): - """Describes azure managed provider. - - All required parameters must be populated in order to send to Azure. - - :param priority: Describes priority of the rule - :type priority: int - :param version: defines version of the rule set - :type version: int - :param rule_set_type: Required. Constant filled by server. - :type rule_set_type: str - :param rule_group_overrides: List of azure managed provider override - configuration (optional) - :type rule_group_overrides: - list[~azure.mgmt.frontdoor.models.AzureManagedOverrideRuleGroup] - """ - - _validation = { - 'rule_set_type': {'required': True}, - } - - _attribute_map = { - 'priority': {'key': 'priority', 'type': 'int'}, - 'version': {'key': 'version', 'type': 'int'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[AzureManagedOverrideRuleGroup]'}, - } - - def __init__(self, **kwargs): - super(AzureManagedRuleSet, self).__init__(**kwargs) - self.rule_group_overrides = kwargs.get('rule_group_overrides', None) - self.rule_set_type = 'AzureManagedRuleSet' diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set_py3.py deleted file mode 100644 index 56d63d6f45db..000000000000 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/azure_managed_rule_set_py3.py +++ /dev/null @@ -1,46 +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 .managed_rule_set_py3 import ManagedRuleSet - - -class AzureManagedRuleSet(ManagedRuleSet): - """Describes azure managed provider. - - All required parameters must be populated in order to send to Azure. - - :param priority: Describes priority of the rule - :type priority: int - :param version: defines version of the rule set - :type version: int - :param rule_set_type: Required. Constant filled by server. - :type rule_set_type: str - :param rule_group_overrides: List of azure managed provider override - configuration (optional) - :type rule_group_overrides: - list[~azure.mgmt.frontdoor.models.AzureManagedOverrideRuleGroup] - """ - - _validation = { - 'rule_set_type': {'required': True}, - } - - _attribute_map = { - 'priority': {'key': 'priority', 'type': 'int'}, - 'version': {'key': 'version', 'type': 'int'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[AzureManagedOverrideRuleGroup]'}, - } - - def __init__(self, *, priority: int=None, version: int=None, rule_group_overrides=None, **kwargs) -> None: - super(AzureManagedRuleSet, self).__init__(priority=priority, version=version, **kwargs) - self.rule_group_overrides = rule_group_overrides - self.rule_set_type = 'AzureManagedRuleSet' diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend.py index d15a56194c1a..e2c358de7522 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend.py @@ -25,7 +25,7 @@ class Backend(Model): values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + ~azure.mgmt.frontdoor.models.BackendEnabledState :param priority: Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend is healthy. diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings.py new file mode 100644 index 000000000000..a0ceb9de5d81 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackendPoolsSettings(Model): + """Settings that apply to all backend pools. + + :param enforce_certificate_name_check: Whether to enforce certificate name + check on HTTPS requests to all backend pools. No effect on non-HTTPS + requests. Possible values include: 'Enabled', 'Disabled'. Default value: + "Enabled" . + :type enforce_certificate_name_check: str or + ~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState + """ + + _attribute_map = { + 'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(BackendPoolsSettings, self).__init__(**kwargs) + self.enforce_certificate_name_check = kwargs.get('enforce_certificate_name_check', "Enabled") diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings_py3.py new file mode 100644 index 000000000000..e903bbc62ef5 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_pools_settings_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BackendPoolsSettings(Model): + """Settings that apply to all backend pools. + + :param enforce_certificate_name_check: Whether to enforce certificate name + check on HTTPS requests to all backend pools. No effect on non-HTTPS + requests. Possible values include: 'Enabled', 'Disabled'. Default value: + "Enabled" . + :type enforce_certificate_name_check: str or + ~azure.mgmt.frontdoor.models.EnforceCertificateNameCheckEnabledState + """ + + _attribute_map = { + 'enforce_certificate_name_check': {'key': 'enforceCertificateNameCheck', 'type': 'str'}, + } + + def __init__(self, *, enforce_certificate_name_check="Enabled", **kwargs) -> None: + super(BackendPoolsSettings, self).__init__(**kwargs) + self.enforce_certificate_name_check = enforce_certificate_name_check diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_py3.py index eb7427630145..d80e1897d310 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/backend_py3.py @@ -25,7 +25,7 @@ class Backend(Model): values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + ~azure.mgmt.frontdoor.models.BackendEnabledState :param priority: Priority to use for load balancing. Higher priorities will not be used for load balancing if any lower priority backend is healthy. diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule.py index 6ee3544c69db..6634e70502b5 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule.py @@ -15,66 +15,62 @@ class CustomRule(Model): """Defines contents of a web application rule. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. - :param name: Gets name of the resource that is unique within a policy. - This name can be used to access the resource. + :param name: Describes the name of the rule. :type name: str - :ivar etag: Gets a unique read-only string that changes whenever the - resource is updated. - :vartype etag: str :param priority: Required. Describes priority of the rule. Rules with a - lower value will be evaluated before rules with a higher value + lower value will be evaluated before rules with a higher value. :type priority: int + :param enabled_state: Describes if the custom rule is in enabled or + disabled state. Defaults to Enabled if not specified. Possible values + include: 'Disabled', 'Enabled' + :type enabled_state: str or + ~azure.mgmt.frontdoor.models.CustomRuleEnabledState :param rule_type: Required. Describes type of rule. Possible values include: 'MatchRule', 'RateLimitRule' :type rule_type: str or ~azure.mgmt.frontdoor.models.RuleType - :param rate_limit_duration_in_minutes: Defines rate limit duration. - Default - 1 minute + :param rate_limit_duration_in_minutes: Time window for resetting the rate + limit count. Default is 1 minute. :type rate_limit_duration_in_minutes: int - :param rate_limit_threshold: Defines rate limit threshold + :param rate_limit_threshold: Number of allowed requests per client within + the time window. :type rate_limit_threshold: int - :param match_conditions: Required. List of match conditions - :type match_conditions: list[~azure.mgmt.frontdoor.models.MatchCondition1] - :param action: Required. Type of Actions. Possible values include: - 'Allow', 'Block', 'Log' - :type action: str or ~azure.mgmt.frontdoor.models.Action - :param transforms: List of transforms - :type transforms: list[str or ~azure.mgmt.frontdoor.models.Transform] + :param match_conditions: Required. List of match conditions. + :type match_conditions: list[~azure.mgmt.frontdoor.models.MatchCondition] + :param action: Required. Describes what action to be applied when rule + matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :type action: str or ~azure.mgmt.frontdoor.models.ActionType """ _validation = { 'name': {'max_length': 128}, - 'etag': {'readonly': True}, 'priority': {'required': True}, 'rule_type': {'required': True}, + 'rate_limit_duration_in_minutes': {'maximum': 5, 'minimum': 0}, + 'rate_limit_threshold': {'minimum': 0}, 'match_conditions': {'required': True}, 'action': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, 'priority': {'key': 'priority', 'type': 'int'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'rule_type': {'key': 'ruleType', 'type': 'str'}, 'rate_limit_duration_in_minutes': {'key': 'rateLimitDurationInMinutes', 'type': 'int'}, 'rate_limit_threshold': {'key': 'rateLimitThreshold', 'type': 'int'}, - 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition1]'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'}, 'action': {'key': 'action', 'type': 'str'}, - 'transforms': {'key': 'transforms', 'type': '[str]'}, } def __init__(self, **kwargs): super(CustomRule, self).__init__(**kwargs) self.name = kwargs.get('name', None) - self.etag = None self.priority = kwargs.get('priority', None) + self.enabled_state = kwargs.get('enabled_state', None) self.rule_type = kwargs.get('rule_type', None) self.rate_limit_duration_in_minutes = kwargs.get('rate_limit_duration_in_minutes', None) self.rate_limit_threshold = kwargs.get('rate_limit_threshold', None) self.match_conditions = kwargs.get('match_conditions', None) self.action = kwargs.get('action', None) - self.transforms = kwargs.get('transforms', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rules.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_list.py similarity index 90% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rules.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_list.py index 07a8252d1e11..3294bb3766a2 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rules.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_list.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class CustomRules(Model): +class CustomRuleList(Model): """Defines contents of custom rules. :param rules: List of rules @@ -24,5 +24,5 @@ class CustomRules(Model): } def __init__(self, **kwargs): - super(CustomRules, self).__init__(**kwargs) + super(CustomRuleList, self).__init__(**kwargs) self.rules = kwargs.get('rules', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rules_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_list_py3.py similarity index 90% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rules_py3.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_list_py3.py index ced7af11f141..504646dc06e0 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rules_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_list_py3.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class CustomRules(Model): +class CustomRuleList(Model): """Defines contents of custom rules. :param rules: List of rules @@ -24,5 +24,5 @@ class CustomRules(Model): } def __init__(self, *, rules=None, **kwargs) -> None: - super(CustomRules, self).__init__(**kwargs) + super(CustomRuleList, self).__init__(**kwargs) self.rules = rules diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_py3.py index 41d5aaf0a267..b029cc87cd55 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/custom_rule_py3.py @@ -15,66 +15,62 @@ class CustomRule(Model): """Defines contents of a web application rule. - Variables are only populated by the server, and will be ignored when - sending a request. - All required parameters must be populated in order to send to Azure. - :param name: Gets name of the resource that is unique within a policy. - This name can be used to access the resource. + :param name: Describes the name of the rule. :type name: str - :ivar etag: Gets a unique read-only string that changes whenever the - resource is updated. - :vartype etag: str :param priority: Required. Describes priority of the rule. Rules with a - lower value will be evaluated before rules with a higher value + lower value will be evaluated before rules with a higher value. :type priority: int + :param enabled_state: Describes if the custom rule is in enabled or + disabled state. Defaults to Enabled if not specified. Possible values + include: 'Disabled', 'Enabled' + :type enabled_state: str or + ~azure.mgmt.frontdoor.models.CustomRuleEnabledState :param rule_type: Required. Describes type of rule. Possible values include: 'MatchRule', 'RateLimitRule' :type rule_type: str or ~azure.mgmt.frontdoor.models.RuleType - :param rate_limit_duration_in_minutes: Defines rate limit duration. - Default - 1 minute + :param rate_limit_duration_in_minutes: Time window for resetting the rate + limit count. Default is 1 minute. :type rate_limit_duration_in_minutes: int - :param rate_limit_threshold: Defines rate limit threshold + :param rate_limit_threshold: Number of allowed requests per client within + the time window. :type rate_limit_threshold: int - :param match_conditions: Required. List of match conditions - :type match_conditions: list[~azure.mgmt.frontdoor.models.MatchCondition1] - :param action: Required. Type of Actions. Possible values include: - 'Allow', 'Block', 'Log' - :type action: str or ~azure.mgmt.frontdoor.models.Action - :param transforms: List of transforms - :type transforms: list[str or ~azure.mgmt.frontdoor.models.Transform] + :param match_conditions: Required. List of match conditions. + :type match_conditions: list[~azure.mgmt.frontdoor.models.MatchCondition] + :param action: Required. Describes what action to be applied when rule + matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :type action: str or ~azure.mgmt.frontdoor.models.ActionType """ _validation = { 'name': {'max_length': 128}, - 'etag': {'readonly': True}, 'priority': {'required': True}, 'rule_type': {'required': True}, + 'rate_limit_duration_in_minutes': {'maximum': 5, 'minimum': 0}, + 'rate_limit_threshold': {'minimum': 0}, 'match_conditions': {'required': True}, 'action': {'required': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, 'priority': {'key': 'priority', 'type': 'int'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'rule_type': {'key': 'ruleType', 'type': 'str'}, 'rate_limit_duration_in_minutes': {'key': 'rateLimitDurationInMinutes', 'type': 'int'}, 'rate_limit_threshold': {'key': 'rateLimitThreshold', 'type': 'int'}, - 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition1]'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'}, 'action': {'key': 'action', 'type': 'str'}, - 'transforms': {'key': 'transforms', 'type': '[str]'}, } - def __init__(self, *, priority: int, rule_type, match_conditions, action, name: str=None, rate_limit_duration_in_minutes: int=None, rate_limit_threshold: int=None, transforms=None, **kwargs) -> None: + def __init__(self, *, priority: int, rule_type, match_conditions, action, name: str=None, enabled_state=None, rate_limit_duration_in_minutes: int=None, rate_limit_threshold: int=None, **kwargs) -> None: super(CustomRule, self).__init__(**kwargs) self.name = name - self.etag = None self.priority = priority + self.enabled_state = enabled_state self.rule_type = rule_type self.rate_limit_duration_in_minutes = rate_limit_duration_in_minutes self.rate_limit_threshold = rate_limit_threshold self.match_conditions = match_conditions self.action = action - self.transforms = transforms diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration.py new file mode 100644 index 000000000000..435f7087385f --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .route_configuration import RouteConfiguration + + +class ForwardingConfiguration(RouteConfiguration): + """Describes Forwarding Route. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param custom_forwarding_path: A custom path used to rewrite resource + paths matched by this rule. Leave empty to use incoming path. + :type custom_forwarding_path: str + :param forwarding_protocol: Protocol this rule will use when forwarding + traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', + 'MatchRequest' + :type forwarding_protocol: str or + ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol + :param cache_configuration: The caching configuration associated with this + rule. + :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration + :param backend_pool: A reference to the BackendPool which this rule routes + to. + :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'}, + 'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'}, + 'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'}, + 'backend_pool': {'key': 'backendPool', 'type': 'SubResource'}, + } + + def __init__(self, **kwargs): + super(ForwardingConfiguration, self).__init__(**kwargs) + self.custom_forwarding_path = kwargs.get('custom_forwarding_path', None) + self.forwarding_protocol = kwargs.get('forwarding_protocol', None) + self.cache_configuration = kwargs.get('cache_configuration', None) + self.backend_pool = kwargs.get('backend_pool', None) + self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration_py3.py new file mode 100644 index 000000000000..cd8562336477 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/forwarding_configuration_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .route_configuration_py3 import RouteConfiguration + + +class ForwardingConfiguration(RouteConfiguration): + """Describes Forwarding Route. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param custom_forwarding_path: A custom path used to rewrite resource + paths matched by this rule. Leave empty to use incoming path. + :type custom_forwarding_path: str + :param forwarding_protocol: Protocol this rule will use when forwarding + traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', + 'MatchRequest' + :type forwarding_protocol: str or + ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol + :param cache_configuration: The caching configuration associated with this + rule. + :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration + :param backend_pool: A reference to the BackendPool which this rule routes + to. + :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'}, + 'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'}, + 'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'}, + 'backend_pool': {'key': 'backendPool', 'type': 'SubResource'}, + } + + def __init__(self, *, custom_forwarding_path: str=None, forwarding_protocol=None, cache_configuration=None, backend_pool=None, **kwargs) -> None: + super(ForwardingConfiguration, self).__init__(**kwargs) + self.custom_forwarding_path = custom_forwarding_path + self.forwarding_protocol = forwarding_protocol + self.cache_configuration = cache_configuration + self.backend_pool = backend_pool + self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door.py index 2893d3972dd0..513f01aea833 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door.py @@ -46,6 +46,9 @@ class FrontDoor(Resource): :param frontend_endpoints: Frontend endpoints available to routing rules. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools + :type backend_pools_settings: + ~azure.mgmt.frontdoor.models.BackendPoolsSettings :param enabled_state: Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' @@ -82,6 +85,7 @@ class FrontDoor(Resource): 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': '[HealthProbeSettingsModel]'}, 'backend_pools': {'key': 'properties.backendPools', 'type': '[BackendPool]'}, 'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[FrontendEndpoint]'}, + 'backend_pools_settings': {'key': 'properties.backendPoolsSettings', 'type': 'BackendPoolsSettings'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -96,6 +100,7 @@ def __init__(self, **kwargs): self.health_probe_settings = kwargs.get('health_probe_settings', None) self.backend_pools = kwargs.get('backend_pools', None) self.frontend_endpoints = kwargs.get('frontend_endpoints', None) + self.backend_pools_settings = kwargs.get('backend_pools_settings', None) self.enabled_state = kwargs.get('enabled_state', None) self.resource_state = kwargs.get('resource_state', None) self.provisioning_state = None 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 069909cf497c..04dbf18ac020 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 @@ -61,6 +61,12 @@ class FrontDoorCertificateType(str, Enum): dedicated = "Dedicated" +class EnforceCertificateNameCheckEnabledState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class FrontDoorEnabledState(str, Enum): enabled = "Enabled" @@ -73,6 +79,12 @@ class FrontDoorProtocol(str, Enum): https = "Https" +class RoutingRuleEnabledState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class FrontDoorForwardingProtocol(str, Enum): http_only = "HttpOnly" @@ -92,6 +104,27 @@ class DynamicCompressionEnabled(str, Enum): disabled = "Disabled" +class FrontDoorRedirectType(str, Enum): + + moved = "Moved" + found = "Found" + temporary_redirect = "TemporaryRedirect" + permanent_redirect = "PermanentRedirect" + + +class FrontDoorRedirectProtocol(str, Enum): + + http_only = "HttpOnly" + https_only = "HttpsOnly" + match_request = "MatchRequest" + + +class BackendEnabledState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class SessionAffinityEnabledState(str, Enum): enabled = "Enabled" @@ -117,25 +150,31 @@ class NetworkOperationStatus(str, Enum): failed = "Failed" -class EnabledState(str, Enum): +class PolicyEnabledState(str, Enum): disabled = "Disabled" enabled = "Enabled" -class Mode(str, Enum): +class PolicyMode(str, Enum): prevention = "Prevention" detection = "Detection" +class CustomRuleEnabledState(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + class RuleType(str, Enum): match_rule = "MatchRule" rate_limit_rule = "RateLimitRule" -class MatchCondition(str, Enum): +class MatchVariable(str, Enum): remote_addr = "RemoteAddr" request_method = "RequestMethod" @@ -144,6 +183,7 @@ class MatchCondition(str, Enum): request_uri = "RequestUri" request_header = "RequestHeader" request_body = "RequestBody" + cookies = "Cookies" class Operator(str, Enum): @@ -159,16 +199,10 @@ class Operator(str, Enum): greater_than_or_equal = "GreaterThanOrEqual" begins_with = "BeginsWith" ends_with = "EndsWith" + reg_ex = "RegEx" -class Action(str, Enum): - - allow = "Allow" - block = "Block" - log = "Log" - - -class Transform(str, Enum): +class TransformType(str, Enum): lowercase = "Lowercase" uppercase = "Uppercase" @@ -176,10 +210,23 @@ class Transform(str, Enum): url_decode = "UrlDecode" url_encode = "UrlEncode" remove_nulls = "RemoveNulls" - html_entity_decode = "HtmlEntityDecode" -class WebApplicationFirewallPolicy(str, Enum): +class ActionType(str, Enum): + + allow = "Allow" + block = "Block" + log = "Log" + redirect = "Redirect" + + +class ManagedRuleEnabledState(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class PolicyResourceState(str, Enum): creating = "Creating" enabling = "Enabling" @@ -187,9 +234,3 @@ class WebApplicationFirewallPolicy(str, Enum): disabling = "Disabling" disabled = "Disabled" deleting = "Deleting" - - -class RuleGroupOverride(str, Enum): - - sql_injection = "SqlInjection" - xss = "XSS" diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_py3.py index 1af837e68018..1fbac8455212 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_py3.py @@ -46,6 +46,9 @@ class FrontDoor(Resource): :param frontend_endpoints: Frontend endpoints available to routing rules. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools + :type backend_pools_settings: + ~azure.mgmt.frontdoor.models.BackendPoolsSettings :param enabled_state: Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' @@ -82,13 +85,14 @@ class FrontDoor(Resource): 'health_probe_settings': {'key': 'properties.healthProbeSettings', 'type': '[HealthProbeSettingsModel]'}, 'backend_pools': {'key': 'properties.backendPools', 'type': '[BackendPool]'}, 'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[FrontendEndpoint]'}, + 'backend_pools_settings': {'key': 'properties.backendPoolsSettings', 'type': 'BackendPoolsSettings'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'cname': {'key': 'properties.cname', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, friendly_name: str=None, routing_rules=None, load_balancing_settings=None, health_probe_settings=None, backend_pools=None, frontend_endpoints=None, enabled_state=None, resource_state=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, friendly_name: str=None, routing_rules=None, load_balancing_settings=None, health_probe_settings=None, backend_pools=None, frontend_endpoints=None, backend_pools_settings=None, enabled_state=None, resource_state=None, **kwargs) -> None: super(FrontDoor, self).__init__(location=location, tags=tags, **kwargs) self.friendly_name = friendly_name self.routing_rules = routing_rules @@ -96,6 +100,7 @@ def __init__(self, *, location: str=None, tags=None, friendly_name: str=None, ro self.health_probe_settings = health_probe_settings self.backend_pools = backend_pools self.frontend_endpoints = frontend_endpoints + self.backend_pools_settings = backend_pools_settings self.enabled_state = enabled_state self.resource_state = resource_state self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters.py index 9411f5c42c12..f5e1816bd91c 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters.py @@ -32,6 +32,9 @@ class FrontDoorUpdateParameters(Model): :param frontend_endpoints: Frontend endpoints available to routing rules. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools + :type backend_pools_settings: + ~azure.mgmt.frontdoor.models.BackendPoolsSettings :param enabled_state: Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' @@ -46,6 +49,7 @@ class FrontDoorUpdateParameters(Model): 'health_probe_settings': {'key': 'healthProbeSettings', 'type': '[HealthProbeSettingsModel]'}, 'backend_pools': {'key': 'backendPools', 'type': '[BackendPool]'}, 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[FrontendEndpoint]'}, + 'backend_pools_settings': {'key': 'backendPoolsSettings', 'type': 'BackendPoolsSettings'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, } @@ -57,4 +61,5 @@ def __init__(self, **kwargs): self.health_probe_settings = kwargs.get('health_probe_settings', None) self.backend_pools = kwargs.get('backend_pools', None) self.frontend_endpoints = kwargs.get('frontend_endpoints', None) + self.backend_pools_settings = kwargs.get('backend_pools_settings', None) self.enabled_state = kwargs.get('enabled_state', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters_py3.py index 127259641e8c..09b6cded262b 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/front_door_update_parameters_py3.py @@ -32,6 +32,9 @@ class FrontDoorUpdateParameters(Model): :param frontend_endpoints: Frontend endpoints available to routing rules. :type frontend_endpoints: list[~azure.mgmt.frontdoor.models.FrontendEndpoint] + :param backend_pools_settings: Settings for all backendPools + :type backend_pools_settings: + ~azure.mgmt.frontdoor.models.BackendPoolsSettings :param enabled_state: Operational status of the Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' @@ -46,10 +49,11 @@ class FrontDoorUpdateParameters(Model): 'health_probe_settings': {'key': 'healthProbeSettings', 'type': '[HealthProbeSettingsModel]'}, 'backend_pools': {'key': 'backendPools', 'type': '[BackendPool]'}, 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[FrontendEndpoint]'}, + 'backend_pools_settings': {'key': 'backendPoolsSettings', 'type': 'BackendPoolsSettings'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, } - def __init__(self, *, friendly_name: str=None, routing_rules=None, load_balancing_settings=None, health_probe_settings=None, backend_pools=None, frontend_endpoints=None, enabled_state=None, **kwargs) -> None: + def __init__(self, *, friendly_name: str=None, routing_rules=None, load_balancing_settings=None, health_probe_settings=None, backend_pools=None, frontend_endpoints=None, backend_pools_settings=None, enabled_state=None, **kwargs) -> None: super(FrontDoorUpdateParameters, self).__init__(**kwargs) self.friendly_name = friendly_name self.routing_rules = routing_rules @@ -57,4 +61,5 @@ def __init__(self, *, friendly_name: str=None, routing_rules=None, load_balancin self.health_probe_settings = health_probe_settings self.backend_pools = backend_pools self.frontend_endpoints = frontend_endpoints + self.backend_pools_settings = backend_pools_settings self.enabled_state = enabled_state diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_sets.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/frontend_endpoint_link.py similarity index 61% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_sets.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/frontend_endpoint_link.py index 37e70e26f118..f1497da99289 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_sets.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/frontend_endpoint_link.py @@ -12,17 +12,17 @@ from msrest.serialization import Model -class ManagedRuleSets(Model): - """Defines ManagedRuleSets - array of managedRuleSet. +class FrontendEndpointLink(Model): + """Defines the Resource ID for a Frontend Endpoint. - :param rule_sets: List of rules - :type rule_sets: list[~azure.mgmt.frontdoor.models.ManagedRuleSet] + :param id: Resource ID. + :type id: str """ _attribute_map = { - 'rule_sets': {'key': 'ruleSets', 'type': '[ManagedRuleSet]'}, + 'id': {'key': 'id', 'type': 'str'}, } def __init__(self, **kwargs): - super(ManagedRuleSets, self).__init__(**kwargs) - self.rule_sets = kwargs.get('rule_sets', None) + super(FrontendEndpointLink, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_sets_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/frontend_endpoint_link_py3.py similarity index 57% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_sets_py3.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/frontend_endpoint_link_py3.py index 48f15606ed69..5493cb083a91 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_sets_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/frontend_endpoint_link_py3.py @@ -12,17 +12,17 @@ from msrest.serialization import Model -class ManagedRuleSets(Model): - """Defines ManagedRuleSets - array of managedRuleSet. +class FrontendEndpointLink(Model): + """Defines the Resource ID for a Frontend Endpoint. - :param rule_sets: List of rules - :type rule_sets: list[~azure.mgmt.frontdoor.models.ManagedRuleSet] + :param id: Resource ID. + :type id: str """ _attribute_map = { - 'rule_sets': {'key': 'ruleSets', 'type': '[ManagedRuleSet]'}, + 'id': {'key': 'id', 'type': 'str'}, } - def __init__(self, *, rule_sets=None, **kwargs) -> None: - super(ManagedRuleSets, self).__init__(**kwargs) - self.rule_sets = rule_sets + def __init__(self, *, id: str=None, **kwargs) -> None: + super(FrontendEndpointLink, self).__init__(**kwargs) + self.id = id 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 new file mode 100644 index 000000000000..36a5110ead68 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition.py @@ -0,0 +1,40 @@ +# 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 ManagedRuleDefinition(Model): + """Describes a managed rule definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar rule_id: Identifier for the managed rule. + :vartype rule_id: str + :ivar description: Describes the functionality of the managed rule. + :vartype description: str + """ + + _validation = { + 'rule_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleDefinition, self).__init__(**kwargs) + self.rule_id = 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 new file mode 100644 index 000000000000..458fec2d0b6c --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_definition_py3.py @@ -0,0 +1,40 @@ +# 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 ManagedRuleDefinition(Model): + """Describes a managed rule definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar rule_id: Identifier for the managed rule. + :vartype rule_id: str + :ivar description: Describes the functionality of the managed rule. + :vartype description: str + """ + + _validation = { + 'rule_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ManagedRuleDefinition, self).__init__(**kwargs) + self.rule_id = None + self.description = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition.py new file mode 100644 index 000000000000..c9670337c72f --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition.py @@ -0,0 +1,45 @@ +# 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 ManagedRuleGroupDefinition(Model): + """Describes a managed rule group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar rule_group_name: Name of the managed rule group. + :vartype rule_group_name: str + :ivar description: Description of the managed rule group. + :vartype description: str + :ivar rules: List of rules within the managed rule group. + :vartype rules: list[~azure.mgmt.frontdoor.models.ManagedRuleDefinition] + """ + + _validation = { + 'rule_group_name': {'readonly': True}, + 'description': {'readonly': True}, + 'rules': {'readonly': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ManagedRuleDefinition]'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleGroupDefinition, self).__init__(**kwargs) + self.rule_group_name = None + self.description = None + self.rules = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition_py3.py new file mode 100644 index 000000000000..95d1e3f303cd --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_definition_py3.py @@ -0,0 +1,45 @@ +# 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 ManagedRuleGroupDefinition(Model): + """Describes a managed rule group. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar rule_group_name: Name of the managed rule group. + :vartype rule_group_name: str + :ivar description: Description of the managed rule group. + :vartype description: str + :ivar rules: List of rules within the managed rule group. + :vartype rules: list[~azure.mgmt.frontdoor.models.ManagedRuleDefinition] + """ + + _validation = { + 'rule_group_name': {'readonly': True}, + 'description': {'readonly': True}, + 'rules': {'readonly': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ManagedRuleDefinition]'}, + } + + def __init__(self, **kwargs) -> None: + super(ManagedRuleGroupDefinition, self).__init__(**kwargs) + self.rule_group_name = None + self.description = None + self.rules = None 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 new file mode 100644 index 000000000000..370b57cfbd09 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override.py @@ -0,0 +1,40 @@ +# 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 ManagedRuleGroupOverride(Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. Describes the managed rule group to + override. + :type rule_group_name: str + :param rules: List of rules that will be disabled. If none specified, all + rules in the group will be disabled. + :type rules: list[~azure.mgmt.frontdoor.models.ManagedRuleOverride] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleGroupOverride, self).__init__(**kwargs) + self.rule_group_name = kwargs.get('rule_group_name', 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 new file mode 100644 index 000000000000..f7c00c8a3736 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_group_override_py3.py @@ -0,0 +1,40 @@ +# 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 ManagedRuleGroupOverride(Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. Describes the managed rule group to + override. + :type rule_group_name: str + :param rules: List of rules that will be disabled. If none specified, all + rules in the group will be disabled. + :type rules: list[~azure.mgmt.frontdoor.models.ManagedRuleOverride] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, + } + + def __init__(self, *, rule_group_name: str, rules=None, **kwargs) -> None: + super(ManagedRuleGroupOverride, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules 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 new file mode 100644 index 000000000000..7174011cac7a --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override.py @@ -0,0 +1,46 @@ +# 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 ManagedRuleOverride(Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. Identifier for the managed rule. + :type rule_id: str + :param enabled_state: Describes if the managed rule is in enabled or + disabled state. Defaults to Disabled if not specified. Possible values + include: 'Disabled', 'Enabled' + :type enabled_state: str or + ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :param action: Describes the override action to be applied when rule + matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :type action: str or ~azure.mgmt.frontdoor.models.ActionType + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleOverride, self).__init__(**kwargs) + self.rule_id = kwargs.get('rule_id', None) + self.enabled_state = kwargs.get('enabled_state', None) + self.action = kwargs.get('action', 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 new file mode 100644 index 000000000000..8dcf5fbd8318 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_override_py3.py @@ -0,0 +1,46 @@ +# 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 ManagedRuleOverride(Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. Identifier for the managed rule. + :type rule_id: str + :param enabled_state: Describes if the managed rule is in enabled or + disabled state. Defaults to Disabled if not specified. Possible values + include: 'Disabled', 'Enabled' + :type enabled_state: str or + ~azure.mgmt.frontdoor.models.ManagedRuleEnabledState + :param action: Describes the override action to be applied when rule + matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' + :type action: str or ~azure.mgmt.frontdoor.models.ActionType + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__(self, *, rule_id: str, enabled_state=None, action=None, **kwargs) -> None: + super(ManagedRuleOverride, self).__init__(**kwargs) + self.rule_id = rule_id + self.enabled_state = enabled_state + self.action = action 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 58c23333357c..2f9ecc12febb 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 @@ -13,37 +13,34 @@ class ManagedRuleSet(Model): - """Base class for all types of ManagedRuleSet. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureManagedRuleSet + """Defines a managed rule set. All required parameters must be populated in order to send to Azure. - :param priority: Describes priority of the rule - :type priority: int - :param version: defines version of the rule set - :type version: int - :param rule_set_type: Required. Constant filled by server. + :param rule_set_type: Required. Defines the rule set type to use. :type rule_set_type: str + :param rule_set_version: Required. Defines the version of the rule set to + use. + :type rule_set_version: str + :param rule_group_overrides: Defines the rule group overrides to apply to + the rule set. + :type rule_group_overrides: + list[~azure.mgmt.frontdoor.models.ManagedRuleGroupOverride] """ _validation = { 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, } _attribute_map = { - 'priority': {'key': 'priority', 'type': 'int'}, - 'version': {'key': 'version', 'type': 'int'}, 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - } - - _subtype_map = { - 'rule_set_type': {'AzureManagedRuleSet': 'AzureManagedRuleSet'} + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, } def __init__(self, **kwargs): super(ManagedRuleSet, self).__init__(**kwargs) - self.priority = kwargs.get('priority', None) - self.version = kwargs.get('version', None) - self.rule_set_type = None + self.rule_set_type = kwargs.get('rule_set_type', None) + self.rule_set_version = kwargs.get('rule_set_version', 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_definition.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition.py new file mode 100644 index 000000000000..0864cd16bfd0 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition.py @@ -0,0 +1,69 @@ +# 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 .resource import Resource + + +class ManagedRuleSetDefinition(Resource): + """Describes the a managed rule set definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the managed rule set. + :vartype provisioning_state: str + :ivar rule_set_type: Type of the managed rule set. + :vartype rule_set_type: str + :ivar rule_set_version: Version of the managed rule set type. + :vartype rule_set_version: str + :ivar rule_groups: Rule groups of the managed rule set. + :vartype rule_groups: + list[~azure.mgmt.frontdoor.models.ManagedRuleGroupDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'rule_set_type': {'readonly': True}, + 'rule_set_version': {'readonly': True}, + 'rule_groups': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ManagedRuleGroupDefinition]'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleSetDefinition, self).__init__(**kwargs) + self.provisioning_state = None + self.rule_set_type = None + self.rule_set_version = None + self.rule_groups = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_paged.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_paged.py new file mode 100644 index 000000000000..cdec085e91a5 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_paged.py @@ -0,0 +1,27 @@ +# 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 ManagedRuleSetDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ManagedRuleSetDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ManagedRuleSetDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(ManagedRuleSetDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_py3.py new file mode 100644 index 000000000000..763cc211949b --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_definition_py3.py @@ -0,0 +1,69 @@ +# 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 .resource_py3 import Resource + + +class ManagedRuleSetDefinition(Resource): + """Describes the a managed rule set definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: Provisioning state of the managed rule set. + :vartype provisioning_state: str + :ivar rule_set_type: Type of the managed rule set. + :vartype rule_set_type: str + :ivar rule_set_version: Version of the managed rule set type. + :vartype rule_set_version: str + :ivar rule_groups: Rule groups of the managed rule set. + :vartype rule_groups: + list[~azure.mgmt.frontdoor.models.ManagedRuleGroupDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'rule_set_type': {'readonly': True}, + 'rule_set_version': {'readonly': True}, + 'rule_groups': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ManagedRuleGroupDefinition]'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(ManagedRuleSetDefinition, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.rule_set_type = None + self.rule_set_version = None + self.rule_groups = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list.py new file mode 100644 index 000000000000..ef51205649fc --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list.py @@ -0,0 +1,28 @@ +# 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 ManagedRuleSetList(Model): + """Defines the list of managed rule sets for the policy. + + :param managed_rule_sets: List of rule sets. + :type managed_rule_sets: list[~azure.mgmt.frontdoor.models.ManagedRuleSet] + """ + + _attribute_map = { + 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, + } + + def __init__(self, **kwargs): + super(ManagedRuleSetList, self).__init__(**kwargs) + self.managed_rule_sets = kwargs.get('managed_rule_sets', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list_py3.py new file mode 100644 index 000000000000..e75eb870a407 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/managed_rule_set_list_py3.py @@ -0,0 +1,28 @@ +# 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 ManagedRuleSetList(Model): + """Defines the list of managed rule sets for the policy. + + :param managed_rule_sets: List of rule sets. + :type managed_rule_sets: list[~azure.mgmt.frontdoor.models.ManagedRuleSet] + """ + + _attribute_map = { + 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, + } + + def __init__(self, *, managed_rule_sets=None, **kwargs) -> None: + super(ManagedRuleSetList, self).__init__(**kwargs) + self.managed_rule_sets = managed_rule_sets 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 423d1317f6ca..88e6a6d3d9a0 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 @@ -13,37 +13,34 @@ class ManagedRuleSet(Model): - """Base class for all types of ManagedRuleSet. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureManagedRuleSet + """Defines a managed rule set. All required parameters must be populated in order to send to Azure. - :param priority: Describes priority of the rule - :type priority: int - :param version: defines version of the rule set - :type version: int - :param rule_set_type: Required. Constant filled by server. + :param rule_set_type: Required. Defines the rule set type to use. :type rule_set_type: str + :param rule_set_version: Required. Defines the version of the rule set to + use. + :type rule_set_version: str + :param rule_group_overrides: Defines the rule group overrides to apply to + the rule set. + :type rule_group_overrides: + list[~azure.mgmt.frontdoor.models.ManagedRuleGroupOverride] """ _validation = { 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, } _attribute_map = { - 'priority': {'key': 'priority', 'type': 'int'}, - 'version': {'key': 'version', 'type': 'int'}, 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, } - _subtype_map = { - 'rule_set_type': {'AzureManagedRuleSet': 'AzureManagedRuleSet'} - } - - def __init__(self, *, priority: int=None, version: int=None, **kwargs) -> None: + def __init__(self, *, rule_set_type: str, rule_set_version: str, rule_group_overrides=None, **kwargs) -> None: super(ManagedRuleSet, self).__init__(**kwargs) - self.priority = priority - self.version = version - self.rule_set_type = None + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_group_overrides = rule_group_overrides diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition1.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition.py similarity index 58% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition1.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition.py index 6667f15c68c9..bbd75b247d3e 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition1.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition.py @@ -12,27 +12,30 @@ from msrest.serialization import Model -class MatchCondition1(Model): - """Define match conditions. +class MatchCondition(Model): + """Define a match condition. All required parameters must be populated in order to send to Azure. - :param match_variable: Required. Match Variable. Possible values include: - 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestUri', - 'RequestHeader', 'RequestBody' - :type match_variable: str or ~azure.mgmt.frontdoor.models.MatchCondition - :param selector: Name of selector in RequestHeader or RequestBody to be - matched + :param match_variable: Required. Request variable to compare with. + Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', + 'PostArgs', 'RequestUri', 'RequestHeader', 'RequestBody', 'Cookies' + :type match_variable: str or ~azure.mgmt.frontdoor.models.MatchVariable + :param selector: Match against a specific key from the QueryString, + PostArgs, RequestHeader or Cookies variables. Default is null. :type selector: str - :param operator: Required. Describes operator to be matched. Possible - values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', - 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', - 'BeginsWith', 'EndsWith' + :param operator: Required. Comparison type to use for matching with the + variable value. Possible values include: 'Any', 'IPMatch', 'GeoMatch', + 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', + 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' :type operator: str or ~azure.mgmt.frontdoor.models.Operator - :param negate_condition: Describes if this is negate condition or not + :param negate_condition: Describes if the result of this condition should + be negated. :type negate_condition: bool - :param match_value: Required. Match value + :param match_value: Required. List of possible match values. :type match_value: list[str] + :param transforms: List of transforms. + :type transforms: list[str or ~azure.mgmt.frontdoor.models.TransformType] """ _validation = { @@ -47,12 +50,14 @@ class MatchCondition1(Model): 'operator': {'key': 'operator', 'type': 'str'}, 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, 'match_value': {'key': 'matchValue', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, } def __init__(self, **kwargs): - super(MatchCondition1, self).__init__(**kwargs) + super(MatchCondition, self).__init__(**kwargs) self.match_variable = kwargs.get('match_variable', None) self.selector = kwargs.get('selector', None) self.operator = kwargs.get('operator', None) self.negate_condition = kwargs.get('negate_condition', None) self.match_value = kwargs.get('match_value', None) + self.transforms = kwargs.get('transforms', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition1_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition_py3.py similarity index 56% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition1_py3.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition_py3.py index 827eae5fc708..18d040a78eb5 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition1_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/match_condition_py3.py @@ -12,27 +12,30 @@ from msrest.serialization import Model -class MatchCondition1(Model): - """Define match conditions. +class MatchCondition(Model): + """Define a match condition. All required parameters must be populated in order to send to Azure. - :param match_variable: Required. Match Variable. Possible values include: - 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestUri', - 'RequestHeader', 'RequestBody' - :type match_variable: str or ~azure.mgmt.frontdoor.models.MatchCondition - :param selector: Name of selector in RequestHeader or RequestBody to be - matched + :param match_variable: Required. Request variable to compare with. + Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', + 'PostArgs', 'RequestUri', 'RequestHeader', 'RequestBody', 'Cookies' + :type match_variable: str or ~azure.mgmt.frontdoor.models.MatchVariable + :param selector: Match against a specific key from the QueryString, + PostArgs, RequestHeader or Cookies variables. Default is null. :type selector: str - :param operator: Required. Describes operator to be matched. Possible - values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', - 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', - 'BeginsWith', 'EndsWith' + :param operator: Required. Comparison type to use for matching with the + variable value. Possible values include: 'Any', 'IPMatch', 'GeoMatch', + 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', + 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' :type operator: str or ~azure.mgmt.frontdoor.models.Operator - :param negate_condition: Describes if this is negate condition or not + :param negate_condition: Describes if the result of this condition should + be negated. :type negate_condition: bool - :param match_value: Required. Match value + :param match_value: Required. List of possible match values. :type match_value: list[str] + :param transforms: List of transforms. + :type transforms: list[str or ~azure.mgmt.frontdoor.models.TransformType] """ _validation = { @@ -47,12 +50,14 @@ class MatchCondition1(Model): 'operator': {'key': 'operator', 'type': 'str'}, 'negate_condition': {'key': 'negateCondition', 'type': 'bool'}, 'match_value': {'key': 'matchValue', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, } - def __init__(self, *, match_variable, operator, match_value, selector: str=None, negate_condition: bool=None, **kwargs) -> None: - super(MatchCondition1, self).__init__(**kwargs) + def __init__(self, *, match_variable, operator, match_value, selector: str=None, negate_condition: bool=None, transforms=None, **kwargs) -> None: + super(MatchCondition, self).__init__(**kwargs) self.match_variable = match_variable self.selector = selector self.operator = operator self.negate_condition = negate_condition self.match_value = match_value + self.transforms = transforms diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings.py index 3046acd2c7ac..498f0afd6f02 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings.py @@ -13,22 +13,44 @@ class PolicySettings(Model): - """Defines contents of a web application firewall global configuration. + """Defines top-level WebApplicationFirewallPolicy configuration settings. - :param enabled_state: describes if the policy is in enabled state or - disabled state. Possible values include: 'Disabled', 'Enabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.EnabledState - :param mode: Describes if it is in detection mode or prevention mode at + :param enabled_state: Describes if the policy is in enabled or disabled + state. Defaults to Enabled if not specified. Possible values include: + 'Disabled', 'Enabled' + :type enabled_state: str or + ~azure.mgmt.frontdoor.models.PolicyEnabledState + :param mode: Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection' - :type mode: str or ~azure.mgmt.frontdoor.models.Mode + :type mode: str or ~azure.mgmt.frontdoor.models.PolicyMode + :param redirect_url: If action type is redirect, this field represents + redirect URL for the client. + :type redirect_url: str + :param custom_block_response_status_code: If the action type is block, + customer can override the response status code. + :type custom_block_response_status_code: int + :param custom_block_response_body: If the action type is block, customer + can override the response body. The body must be specified in base64 + encoding. + :type custom_block_response_body: str """ + _validation = { + 'custom_block_response_body': {'pattern': r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'}, + } + _attribute_map = { 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'mode': {'key': 'mode', 'type': 'str'}, + 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, + 'custom_block_response_status_code': {'key': 'customBlockResponseStatusCode', 'type': 'int'}, + 'custom_block_response_body': {'key': 'customBlockResponseBody', 'type': 'str'}, } def __init__(self, **kwargs): super(PolicySettings, self).__init__(**kwargs) self.enabled_state = kwargs.get('enabled_state', None) self.mode = kwargs.get('mode', None) + self.redirect_url = kwargs.get('redirect_url', None) + self.custom_block_response_status_code = kwargs.get('custom_block_response_status_code', None) + self.custom_block_response_body = kwargs.get('custom_block_response_body', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings_py3.py index 95244a4a4274..f538e85e0755 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/policy_settings_py3.py @@ -13,22 +13,44 @@ class PolicySettings(Model): - """Defines contents of a web application firewall global configuration. + """Defines top-level WebApplicationFirewallPolicy configuration settings. - :param enabled_state: describes if the policy is in enabled state or - disabled state. Possible values include: 'Disabled', 'Enabled' - :type enabled_state: str or ~azure.mgmt.frontdoor.models.EnabledState - :param mode: Describes if it is in detection mode or prevention mode at + :param enabled_state: Describes if the policy is in enabled or disabled + state. Defaults to Enabled if not specified. Possible values include: + 'Disabled', 'Enabled' + :type enabled_state: str or + ~azure.mgmt.frontdoor.models.PolicyEnabledState + :param mode: Describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection' - :type mode: str or ~azure.mgmt.frontdoor.models.Mode + :type mode: str or ~azure.mgmt.frontdoor.models.PolicyMode + :param redirect_url: If action type is redirect, this field represents + redirect URL for the client. + :type redirect_url: str + :param custom_block_response_status_code: If the action type is block, + customer can override the response status code. + :type custom_block_response_status_code: int + :param custom_block_response_body: If the action type is block, customer + can override the response body. The body must be specified in base64 + encoding. + :type custom_block_response_body: str """ + _validation = { + 'custom_block_response_body': {'pattern': r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$'}, + } + _attribute_map = { 'enabled_state': {'key': 'enabledState', 'type': 'str'}, 'mode': {'key': 'mode', 'type': 'str'}, + 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, + 'custom_block_response_status_code': {'key': 'customBlockResponseStatusCode', 'type': 'int'}, + 'custom_block_response_body': {'key': 'customBlockResponseBody', 'type': 'str'}, } - def __init__(self, *, enabled_state=None, mode=None, **kwargs) -> None: + def __init__(self, *, enabled_state=None, mode=None, redirect_url: str=None, custom_block_response_status_code: int=None, custom_block_response_body: str=None, **kwargs) -> None: super(PolicySettings, self).__init__(**kwargs) self.enabled_state = enabled_state self.mode = mode + self.redirect_url = redirect_url + self.custom_block_response_status_code = custom_block_response_status_code + self.custom_block_response_body = custom_block_response_body diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration.py new file mode 100644 index 000000000000..47b90831e846 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .route_configuration import RouteConfiguration + + +class RedirectConfiguration(RouteConfiguration): + """Describes Redirect Route. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param redirect_type: The redirect type the rule will use when redirecting + traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', + 'PermanentRedirect' + :type redirect_type: str or + ~azure.mgmt.frontdoor.models.FrontDoorRedirectType + :param redirect_protocol: The protocol of the destination to where the + traffic is redirected. Possible values include: 'HttpOnly', 'HttpsOnly', + 'MatchRequest' + :type redirect_protocol: str or + ~azure.mgmt.frontdoor.models.FrontDoorRedirectProtocol + :param custom_host: Host to redirect. Leave empty to use the incoming host + as the destination host. + :type custom_host: str + :param custom_path: The full path to redirect. Path cannot be empty and + must start with /. Leave empty to use the incoming path as destination + path. + :type custom_path: str + :param custom_fragment: Fragment to add to the redirect URL. Fragment is + the part of the URL that comes after #. Do not include the #. + :type custom_fragment: str + :param custom_query_string: The set of query strings to be placed in the + redirect URL. Setting this value would replace any existing query string; + leave empty to preserve the incoming query string. Query string must be in + = format. The first ? and & will be added automatically so do + not include them in the front, but do separate multiple query strings with + &. + :type custom_query_string: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'redirect_type': {'key': 'redirectType', 'type': 'str'}, + 'redirect_protocol': {'key': 'redirectProtocol', 'type': 'str'}, + 'custom_host': {'key': 'customHost', 'type': 'str'}, + 'custom_path': {'key': 'customPath', 'type': 'str'}, + 'custom_fragment': {'key': 'customFragment', 'type': 'str'}, + 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedirectConfiguration, self).__init__(**kwargs) + self.redirect_type = kwargs.get('redirect_type', None) + self.redirect_protocol = kwargs.get('redirect_protocol', None) + self.custom_host = kwargs.get('custom_host', None) + self.custom_path = kwargs.get('custom_path', None) + self.custom_fragment = kwargs.get('custom_fragment', None) + self.custom_query_string = kwargs.get('custom_query_string', None) + self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration_py3.py new file mode 100644 index 000000000000..28641951bdf2 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/redirect_configuration_py3.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .route_configuration_py3 import RouteConfiguration + + +class RedirectConfiguration(RouteConfiguration): + """Describes Redirect Route. + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + :param redirect_type: The redirect type the rule will use when redirecting + traffic. Possible values include: 'Moved', 'Found', 'TemporaryRedirect', + 'PermanentRedirect' + :type redirect_type: str or + ~azure.mgmt.frontdoor.models.FrontDoorRedirectType + :param redirect_protocol: The protocol of the destination to where the + traffic is redirected. Possible values include: 'HttpOnly', 'HttpsOnly', + 'MatchRequest' + :type redirect_protocol: str or + ~azure.mgmt.frontdoor.models.FrontDoorRedirectProtocol + :param custom_host: Host to redirect. Leave empty to use the incoming host + as the destination host. + :type custom_host: str + :param custom_path: The full path to redirect. Path cannot be empty and + must start with /. Leave empty to use the incoming path as destination + path. + :type custom_path: str + :param custom_fragment: Fragment to add to the redirect URL. Fragment is + the part of the URL that comes after #. Do not include the #. + :type custom_fragment: str + :param custom_query_string: The set of query strings to be placed in the + redirect URL. Setting this value would replace any existing query string; + leave empty to preserve the incoming query string. Query string must be in + = format. The first ? and & will be added automatically so do + not include them in the front, but do separate multiple query strings with + &. + :type custom_query_string: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + 'redirect_type': {'key': 'redirectType', 'type': 'str'}, + 'redirect_protocol': {'key': 'redirectProtocol', 'type': 'str'}, + 'custom_host': {'key': 'customHost', 'type': 'str'}, + 'custom_path': {'key': 'customPath', 'type': 'str'}, + 'custom_fragment': {'key': 'customFragment', 'type': 'str'}, + 'custom_query_string': {'key': 'customQueryString', 'type': 'str'}, + } + + def __init__(self, *, redirect_type=None, redirect_protocol=None, custom_host: str=None, custom_path: str=None, custom_fragment: str=None, custom_query_string: str=None, **kwargs) -> None: + super(RedirectConfiguration, self).__init__(**kwargs) + self.redirect_type = redirect_type + self.redirect_protocol = redirect_protocol + self.custom_host = custom_host + self.custom_path = custom_path + self.custom_fragment = custom_fragment + self.custom_query_string = custom_query_string + self.odatatype = '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration.py new file mode 100644 index 000000000000..c3f93b30b83f --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration.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 RouteConfiguration(Model): + """Base class for all types of Route. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ForwardingConfiguration, RedirectConfiguration + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration': 'ForwardingConfiguration', '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration': 'RedirectConfiguration'} + } + + def __init__(self, **kwargs): + super(RouteConfiguration, self).__init__(**kwargs) + self.odatatype = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration_py3.py new file mode 100644 index 000000000000..19badfcf9ad0 --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/route_configuration_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 RouteConfiguration(Model): + """Base class for all types of Route. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ForwardingConfiguration, RedirectConfiguration + + All required parameters must be populated in order to send to Azure. + + :param odatatype: Required. Constant filled by server. + :type odatatype: str + """ + + _validation = { + 'odatatype': {'required': True}, + } + + _attribute_map = { + 'odatatype': {'key': '@odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odatatype': {'#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration': 'ForwardingConfiguration', '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration': 'RedirectConfiguration'} + } + + def __init__(self, **kwargs) -> None: + super(RouteConfiguration, self).__init__(**kwargs) + self.odatatype = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule.py index 90e6d8aa71fd..e5302a8a886b 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule.py @@ -28,25 +28,13 @@ class RoutingRule(SubResource): ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param custom_forwarding_path: A custom path used to rewrite resource - paths matched by this rule. Leave empty to use incoming path. - :type custom_forwarding_path: str - :param forwarding_protocol: Protocol this rule will use when forwarding - traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type forwarding_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol - :param cache_configuration: The caching configuration associated with this - rule. - :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration - :param backend_pool: A reference to the BackendPool which this rule routes - to. - :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param route_configuration: A reference to the routing configuration. + :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration :param resource_state: Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' :type resource_state: str or @@ -66,11 +54,8 @@ class RoutingRule(SubResource): 'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[SubResource]'}, 'accepted_protocols': {'key': 'properties.acceptedProtocols', 'type': '[str]'}, 'patterns_to_match': {'key': 'properties.patternsToMatch', 'type': '[str]'}, - 'custom_forwarding_path': {'key': 'properties.customForwardingPath', 'type': 'str'}, - 'forwarding_protocol': {'key': 'properties.forwardingProtocol', 'type': 'str'}, - 'cache_configuration': {'key': 'properties.cacheConfiguration', 'type': 'CacheConfiguration'}, - 'backend_pool': {'key': 'properties.backendPool', 'type': 'SubResource'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, + 'route_configuration': {'key': 'properties.routeConfiguration', 'type': 'RouteConfiguration'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, @@ -81,11 +66,8 @@ def __init__(self, **kwargs): self.frontend_endpoints = kwargs.get('frontend_endpoints', None) self.accepted_protocols = kwargs.get('accepted_protocols', None) self.patterns_to_match = kwargs.get('patterns_to_match', None) - self.custom_forwarding_path = kwargs.get('custom_forwarding_path', None) - self.forwarding_protocol = kwargs.get('forwarding_protocol', None) - self.cache_configuration = kwargs.get('cache_configuration', None) - self.backend_pool = kwargs.get('backend_pool', None) self.enabled_state = kwargs.get('enabled_state', None) + self.route_configuration = kwargs.get('route_configuration', None) self.resource_state = kwargs.get('resource_state', None) self.name = kwargs.get('name', None) self.type = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_py3.py index 75ab2b98b1ce..e104ced5e0ad 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_py3.py @@ -28,25 +28,13 @@ class RoutingRule(SubResource): ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param custom_forwarding_path: A custom path used to rewrite resource - paths matched by this rule. Leave empty to use incoming path. - :type custom_forwarding_path: str - :param forwarding_protocol: Protocol this rule will use when forwarding - traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type forwarding_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol - :param cache_configuration: The caching configuration associated with this - rule. - :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration - :param backend_pool: A reference to the BackendPool which this rule routes - to. - :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param route_configuration: A reference to the routing configuration. + :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration :param resource_state: Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' :type resource_state: str or @@ -66,26 +54,20 @@ class RoutingRule(SubResource): 'frontend_endpoints': {'key': 'properties.frontendEndpoints', 'type': '[SubResource]'}, 'accepted_protocols': {'key': 'properties.acceptedProtocols', 'type': '[str]'}, 'patterns_to_match': {'key': 'properties.patternsToMatch', 'type': '[str]'}, - 'custom_forwarding_path': {'key': 'properties.customForwardingPath', 'type': 'str'}, - 'forwarding_protocol': {'key': 'properties.forwardingProtocol', 'type': 'str'}, - 'cache_configuration': {'key': 'properties.cacheConfiguration', 'type': 'CacheConfiguration'}, - 'backend_pool': {'key': 'properties.backendPool', 'type': 'SubResource'}, 'enabled_state': {'key': 'properties.enabledState', 'type': 'str'}, + 'route_configuration': {'key': 'properties.routeConfiguration', 'type': 'RouteConfiguration'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, id: str=None, frontend_endpoints=None, accepted_protocols=None, patterns_to_match=None, custom_forwarding_path: str=None, forwarding_protocol=None, cache_configuration=None, backend_pool=None, enabled_state=None, resource_state=None, name: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, frontend_endpoints=None, accepted_protocols=None, patterns_to_match=None, enabled_state=None, route_configuration=None, resource_state=None, name: str=None, **kwargs) -> None: super(RoutingRule, self).__init__(id=id, **kwargs) self.frontend_endpoints = frontend_endpoints self.accepted_protocols = accepted_protocols self.patterns_to_match = patterns_to_match - self.custom_forwarding_path = custom_forwarding_path - self.forwarding_protocol = forwarding_protocol - self.cache_configuration = cache_configuration - self.backend_pool = backend_pool self.enabled_state = enabled_state + self.route_configuration = route_configuration self.resource_state = resource_state self.name = name self.type = None diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters.py index 53a05bba5023..5d06877b4647 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters.py @@ -22,36 +22,21 @@ class RoutingRuleUpdateParameters(Model): ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param custom_forwarding_path: A custom path used to rewrite resource - paths matched by this rule. Leave empty to use incoming path. - :type custom_forwarding_path: str - :param forwarding_protocol: Protocol this rule will use when forwarding - traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type forwarding_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol - :param cache_configuration: The caching configuration associated with this - rule. - :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration - :param backend_pool: A reference to the BackendPool which this rule routes - to. - :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param route_configuration: A reference to the routing configuration. + :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration """ _attribute_map = { 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[SubResource]'}, 'accepted_protocols': {'key': 'acceptedProtocols', 'type': '[str]'}, 'patterns_to_match': {'key': 'patternsToMatch', 'type': '[str]'}, - 'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'}, - 'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'}, - 'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'}, - 'backend_pool': {'key': 'backendPool', 'type': 'SubResource'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'route_configuration': {'key': 'routeConfiguration', 'type': 'RouteConfiguration'}, } def __init__(self, **kwargs): @@ -59,8 +44,5 @@ def __init__(self, **kwargs): self.frontend_endpoints = kwargs.get('frontend_endpoints', None) self.accepted_protocols = kwargs.get('accepted_protocols', None) self.patterns_to_match = kwargs.get('patterns_to_match', None) - self.custom_forwarding_path = kwargs.get('custom_forwarding_path', None) - self.forwarding_protocol = kwargs.get('forwarding_protocol', None) - self.cache_configuration = kwargs.get('cache_configuration', None) - self.backend_pool = kwargs.get('backend_pool', None) self.enabled_state = kwargs.get('enabled_state', None) + self.route_configuration = kwargs.get('route_configuration', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters_py3.py index 473dfd8888c9..098f7552659f 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/routing_rule_update_parameters_py3.py @@ -22,45 +22,27 @@ class RoutingRuleUpdateParameters(Model): ~azure.mgmt.frontdoor.models.FrontDoorProtocol] :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] - :param custom_forwarding_path: A custom path used to rewrite resource - paths matched by this rule. Leave empty to use incoming path. - :type custom_forwarding_path: str - :param forwarding_protocol: Protocol this rule will use when forwarding - traffic to backends. Possible values include: 'HttpOnly', 'HttpsOnly', - 'MatchRequest' - :type forwarding_protocol: str or - ~azure.mgmt.frontdoor.models.FrontDoorForwardingProtocol - :param cache_configuration: The caching configuration associated with this - rule. - :type cache_configuration: ~azure.mgmt.frontdoor.models.CacheConfiguration - :param backend_pool: A reference to the BackendPool which this rule routes - to. - :type backend_pool: ~azure.mgmt.frontdoor.models.SubResource :param enabled_state: Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' :type enabled_state: str or - ~azure.mgmt.frontdoor.models.FrontDoorEnabledState + ~azure.mgmt.frontdoor.models.RoutingRuleEnabledState + :param route_configuration: A reference to the routing configuration. + :type route_configuration: ~azure.mgmt.frontdoor.models.RouteConfiguration """ _attribute_map = { 'frontend_endpoints': {'key': 'frontendEndpoints', 'type': '[SubResource]'}, 'accepted_protocols': {'key': 'acceptedProtocols', 'type': '[str]'}, 'patterns_to_match': {'key': 'patternsToMatch', 'type': '[str]'}, - 'custom_forwarding_path': {'key': 'customForwardingPath', 'type': 'str'}, - 'forwarding_protocol': {'key': 'forwardingProtocol', 'type': 'str'}, - 'cache_configuration': {'key': 'cacheConfiguration', 'type': 'CacheConfiguration'}, - 'backend_pool': {'key': 'backendPool', 'type': 'SubResource'}, 'enabled_state': {'key': 'enabledState', 'type': 'str'}, + 'route_configuration': {'key': 'routeConfiguration', 'type': 'RouteConfiguration'}, } - def __init__(self, *, frontend_endpoints=None, accepted_protocols=None, patterns_to_match=None, custom_forwarding_path: str=None, forwarding_protocol=None, cache_configuration=None, backend_pool=None, enabled_state=None, **kwargs) -> None: + def __init__(self, *, frontend_endpoints=None, accepted_protocols=None, patterns_to_match=None, enabled_state=None, route_configuration=None, **kwargs) -> None: super(RoutingRuleUpdateParameters, self).__init__(**kwargs) self.frontend_endpoints = frontend_endpoints self.accepted_protocols = accepted_protocols self.patterns_to_match = patterns_to_match - self.custom_forwarding_path = custom_forwarding_path - self.forwarding_protocol = forwarding_protocol - self.cache_configuration = cache_configuration - self.backend_pool = backend_pool self.enabled_state = enabled_state + self.route_configuration = route_configuration diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy.py similarity index 76% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy.py index 6ed0220ac712..a0687bd3f192 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy.py @@ -12,7 +12,7 @@ from .resource import Resource -class WebApplicationFirewallPolicy1(Resource): +class WebApplicationFirewallPolicy(Resource): """Defines web application firewall policy. Variables are only populated by the server, and will be ignored when @@ -28,20 +28,23 @@ class WebApplicationFirewallPolicy1(Resource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param policy_settings: Describes policySettings for policy + :param policy_settings: Describes settings for the policy. :type policy_settings: ~azure.mgmt.frontdoor.models.PolicySettings - :param custom_rules: Describes custom rules inside the policy - :type custom_rules: ~azure.mgmt.frontdoor.models.CustomRules - :param managed_rules: Describes managed rules inside the policy - :type managed_rules: ~azure.mgmt.frontdoor.models.ManagedRuleSets - :ivar provisioning_state: Provisioning state of the - WebApplicationFirewallPolicy. + :param custom_rules: Describes custom rules inside the policy. + :type custom_rules: ~azure.mgmt.frontdoor.models.CustomRuleList + :param managed_rules: Describes managed rules inside the policy. + :type managed_rules: ~azure.mgmt.frontdoor.models.ManagedRuleSetList + :ivar frontend_endpoint_links: Describes Frontend Endpoints associated + with this Web Application Firewall policy. + :vartype frontend_endpoint_links: + list[~azure.mgmt.frontdoor.models.FrontendEndpointLink] + :ivar provisioning_state: Provisioning state of the policy. :vartype provisioning_state: str :ivar resource_state: Resource status of the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' :vartype resource_state: str or - ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + ~azure.mgmt.frontdoor.models.PolicyResourceState :param etag: Gets a unique read-only string that changes whenever the resource is updated. :type etag: str @@ -51,6 +54,7 @@ class WebApplicationFirewallPolicy1(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'frontend_endpoint_links': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, } @@ -62,18 +66,20 @@ class WebApplicationFirewallPolicy1(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, - 'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRules'}, - 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSets'}, + 'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRuleList'}, + 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSetList'}, + 'frontend_endpoint_links': {'key': 'properties.frontendEndpointLinks', 'type': '[FrontendEndpointLink]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } def __init__(self, **kwargs): - super(WebApplicationFirewallPolicy1, self).__init__(**kwargs) + super(WebApplicationFirewallPolicy, self).__init__(**kwargs) self.policy_settings = kwargs.get('policy_settings', None) self.custom_rules = kwargs.get('custom_rules', None) self.managed_rules = kwargs.get('managed_rules', None) + self.frontend_endpoint_links = None self.provisioning_state = None self.resource_state = None self.etag = kwargs.get('etag', None) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1_paged.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy_paged.py similarity index 76% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1_paged.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy_paged.py index b3fc5baabd07..3f4e59c1dd7b 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1_paged.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class WebApplicationFirewallPolicy1Paged(Paged): +class WebApplicationFirewallPolicyPaged(Paged): """ - A paging container for iterating over a list of :class:`WebApplicationFirewallPolicy1 ` object + A paging container for iterating over a list of :class:`WebApplicationFirewallPolicy ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[WebApplicationFirewallPolicy1]'} + 'current_page': {'key': 'value', 'type': '[WebApplicationFirewallPolicy]'} } def __init__(self, *args, **kwargs): - super(WebApplicationFirewallPolicy1Paged, self).__init__(*args, **kwargs) + super(WebApplicationFirewallPolicyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1_py3.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy_py3.py similarity index 76% rename from sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1_py3.py rename to sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy_py3.py index 5920b8383ec2..4cc4cbf0c540 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy1_py3.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/models/web_application_firewall_policy_py3.py @@ -12,7 +12,7 @@ from .resource_py3 import Resource -class WebApplicationFirewallPolicy1(Resource): +class WebApplicationFirewallPolicy(Resource): """Defines web application firewall policy. Variables are only populated by the server, and will be ignored when @@ -28,20 +28,23 @@ class WebApplicationFirewallPolicy1(Resource): :type location: str :param tags: Resource tags. :type tags: dict[str, str] - :param policy_settings: Describes policySettings for policy + :param policy_settings: Describes settings for the policy. :type policy_settings: ~azure.mgmt.frontdoor.models.PolicySettings - :param custom_rules: Describes custom rules inside the policy - :type custom_rules: ~azure.mgmt.frontdoor.models.CustomRules - :param managed_rules: Describes managed rules inside the policy - :type managed_rules: ~azure.mgmt.frontdoor.models.ManagedRuleSets - :ivar provisioning_state: Provisioning state of the - WebApplicationFirewallPolicy. + :param custom_rules: Describes custom rules inside the policy. + :type custom_rules: ~azure.mgmt.frontdoor.models.CustomRuleList + :param managed_rules: Describes managed rules inside the policy. + :type managed_rules: ~azure.mgmt.frontdoor.models.ManagedRuleSetList + :ivar frontend_endpoint_links: Describes Frontend Endpoints associated + with this Web Application Firewall policy. + :vartype frontend_endpoint_links: + list[~azure.mgmt.frontdoor.models.FrontendEndpointLink] + :ivar provisioning_state: Provisioning state of the policy. :vartype provisioning_state: str :ivar resource_state: Resource status of the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' :vartype resource_state: str or - ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + ~azure.mgmt.frontdoor.models.PolicyResourceState :param etag: Gets a unique read-only string that changes whenever the resource is updated. :type etag: str @@ -51,6 +54,7 @@ class WebApplicationFirewallPolicy1(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'frontend_endpoint_links': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'resource_state': {'readonly': True}, } @@ -62,18 +66,20 @@ class WebApplicationFirewallPolicy1(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, - 'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRules'}, - 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSets'}, + 'custom_rules': {'key': 'properties.customRules', 'type': 'CustomRuleList'}, + 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRuleSetList'}, + 'frontend_endpoint_links': {'key': 'properties.frontendEndpointLinks', 'type': '[FrontendEndpointLink]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, } def __init__(self, *, location: str=None, tags=None, policy_settings=None, custom_rules=None, managed_rules=None, etag: str=None, **kwargs) -> None: - super(WebApplicationFirewallPolicy1, self).__init__(location=location, tags=tags, **kwargs) + super(WebApplicationFirewallPolicy, self).__init__(location=location, tags=tags, **kwargs) self.policy_settings = policy_settings self.custom_rules = custom_rules self.managed_rules = managed_rules + self.frontend_endpoint_links = None self.provisioning_state = None self.resource_state = None self.etag = etag 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 8f1ba5d477fb..6b950669b1ba 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 @@ -17,6 +17,7 @@ from .frontend_endpoints_operations import FrontendEndpointsOperations from .endpoints_operations import EndpointsOperations from .policies_operations import PoliciesOperations +from .managed_rule_sets_operations import ManagedRuleSetsOperations __all__ = [ 'FrontDoorsOperations', @@ -27,4 +28,5 @@ 'FrontendEndpointsOperations', 'EndpointsOperations', 'PoliciesOperations', + 'ManagedRuleSetsOperations', ] 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 index e7ddae7b45fe..cfc046574d6b 100644 --- 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 @@ -24,7 +24,7 @@ class BackendPoolsOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/endpoints_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/endpoints_operations.py index 16b6fe5722b8..593f746b72e0 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/endpoints_operations.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/endpoints_operations.py @@ -24,7 +24,7 @@ class EndpointsOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config diff --git a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/front_doors_operations.py b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/front_doors_operations.py index 0e7070406164..393d9721e861 100644 --- a/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/front_doors_operations.py +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/front_doors_operations.py @@ -24,7 +24,7 @@ class FrontDoorsOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config 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 0e82bdf28f54..8099aab4bcb1 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 @@ -24,7 +24,7 @@ class FrontendEndpointsOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config 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 index a8e0356a75cc..697c2cf0cb92 100644 --- 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 @@ -24,7 +24,7 @@ class HealthProbeSettingsOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config 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 index 6813d14f1ec9..7437f51958d1 100644 --- 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 @@ -24,7 +24,7 @@ class LoadBalancingSettingsOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config 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 new file mode 100644 index 000000000000..25288522469d --- /dev/null +++ b/sdk/network/azure-mgmt-frontdoor/azure/mgmt/frontdoor/operations/managed_rule_sets_operations.py @@ -0,0 +1,100 @@ +# 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 .. import models + + +class ManagedRuleSetsOperations(object): + """ManagedRuleSetsOperations 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-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-03-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all available managed rule sets. + + :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 ManagedRuleSetDefinition + :rtype: + ~azure.mgmt.frontdoor.models.ManagedRuleSetDefinitionPaged[~azure.mgmt.frontdoor.models.ManagedRuleSetDefinition] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + 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.ManagedRuleSetDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ManagedRuleSetDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets'} 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 228a22b5c995..8755d21e82b0 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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-03-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 = "2018-08-01" + self.api_version = "2019-03-01" self.config = config @@ -43,16 +43,17 @@ def list( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all of the protection policies within a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: Name of the Resource group within the + Azure subscription. :type resource_group_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 WebApplicationFirewallPolicy1 + :return: An iterator like instance of WebApplicationFirewallPolicy :rtype: - ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy1Paged[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy1] + ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicyPaged[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] :raises: :class:`ErrorResponseException` """ @@ -62,7 +63,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = self.list.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -95,11 +96,11 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.WebApplicationFirewallPolicy1Paged(internal_paging, self._deserialize.dependencies) + deserialized = models.WebApplicationFirewallPolicyPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.WebApplicationFirewallPolicy1Paged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.WebApplicationFirewallPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized @@ -109,18 +110,18 @@ def get( self, resource_group_name, policy_name, custom_headers=None, raw=False, **operation_config): """Retrieve protection policy with specified name within a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: Name of the Resource group within the + Azure subscription. :type resource_group_name: str - :param policy_name: The name of the resource group. + :param policy_name: The name of the Web Application Firewall Policy. :type policy_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: WebApplicationFirewallPolicy1 or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy1 or + :return: WebApplicationFirewallPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException` @@ -128,7 +129,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -158,7 +159,7 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('WebApplicationFirewallPolicy1', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -167,34 +168,13 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}'} - def create_or_update( - self, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, **operation_config): - """Creates or update policy with specified rule set name within a resource - group. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param policy_name: The name of the resource group. - :type policy_name: str - :param parameters: Policy to be created. - :type parameters: - ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy1 - :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: WebApplicationFirewallPolicy1 or ClientRawResponse if - raw=true - :rtype: ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy1 or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ + def _create_or_update_initial( + self, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -216,27 +196,83 @@ def create_or_update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy1') + body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') # 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]: + 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('WebApplicationFirewallPolicy1', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', response) if response.status_code == 201: - deserialized = self._deserialize('WebApplicationFirewallPolicy1', response) + deserialized = self._deserialize('WebApplicationFirewallPolicy', response) + if response.status_code == 202: + deserialized = self._deserialize('WebApplicationFirewallPolicy', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + + def create_or_update( + self, resource_group_name, policy_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update policy with specified rule set name within a resource + group. + + :param resource_group_name: Name of the Resource group within the + Azure subscription. + :type resource_group_name: str + :param policy_name: The name of the Web Application Firewall Policy. + :type policy_name: str + :param parameters: Policy to be created. + :type parameters: + ~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy + :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 + WebApplicationFirewallPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.frontdoor.models.WebApplicationFirewallPolicy]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebApplicationFirewallPolicy', 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/FrontDoorWebApplicationFirewallPolicies/{policyName}'} @@ -245,7 +281,7 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=80, min_length=1, pattern=r'^[a-zA-Z0-9_\-\(\)\.]*[^\.]$'), 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -281,9 +317,10 @@ def delete( self, resource_group_name, policy_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes Policy. - :param resource_group_name: The name of the resource group. + :param resource_group_name: Name of the Resource group within the + Azure subscription. :type resource_group_name: str - :param policy_name: The name of the resource group. + :param policy_name: The name of the Web Application Firewall Policy. :type policy_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the 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 index 568968537d1a..bf9129a43d97 100644 --- 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 @@ -24,7 +24,7 @@ class RoutingRulesOperations(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: "2018-08-01". + :ivar api_version: Client API version. Constant value: "2019-04-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-08-01" + self.api_version = "2019-04-01" self.config = config diff --git a/sdk/network/azure-mgmt-frontdoor/setup.py b/sdk/network/azure-mgmt-frontdoor/setup.py index bff1de6438bb..3aa721a88c8b 100644 --- a/sdk/network/azure-mgmt-frontdoor/setup.py +++ b/sdk/network/azure-mgmt-frontdoor/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com',